fix ruff 0.14.0 [pr] (#12547)

This commit is contained in:
chenyu
2025-10-09 01:52:30 -04:00
committed by GitHub
parent 6af29b913b
commit 585bd95b50
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import ctypes, ctypes.util, time
import ctypes, time
import tinygrad.runtime.autogen.nv_gpu as nv_gpu
from enum import Enum, auto
from test.mockgpu.gpu import VirtGPU
+1 -1
View File
@@ -183,7 +183,7 @@ class dtypes:
uints = (uint8, uint16, uint32, uint64)
sints = (int8, int16, int32, int64)
ints = uints + sints
all = floats + ints + (bool, index)
all = floats + ints + (bool, index) # noqa: A003
if (env_default_float := getenv("DEFAULT_FLOAT", "")):
dtypes.default_float = getattr(dtypes, env_default_float.lower())
+1 -1
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from typing import cast, ClassVar
import os, ctypes, ctypes.util, struct, hashlib, functools, importlib, mmap, errno, array, contextlib, sys, weakref, itertools
import os, ctypes, struct, hashlib, functools, importlib, mmap, errno, array, contextlib, sys, weakref, itertools
assert sys.platform != 'win32'
from dataclasses import dataclass
from tinygrad.runtime.support.hcq import HCQCompiled, HCQAllocator, HCQBuffer, HWQueue, CLikeArgsState, HCQSignal, HCQProgram, FileIOInterface
+1 -1
View File
@@ -1,5 +1,5 @@
from __future__ import annotations
import ctypes, ctypes.util, functools
import ctypes, functools
from tinygrad.helpers import DEBUG, getenv, mv_address, init_c_var, init_c_struct_t, suppress_finalizing
from tinygrad.device import Compiled, BufferSpec, LRUAllocator, CompilerPairT
from tinygrad.renderer.cstyle import CUDARenderer
+1 -1
View File
@@ -1,4 +1,4 @@
import subprocess, hashlib, tempfile, ctypes, ctypes.util, re, pathlib
import subprocess, hashlib, tempfile, ctypes, re, pathlib
from typing import Callable
from tinygrad.helpers import to_char_p_p, colored, init_c_var, getenv
import tinygrad.runtime.autogen.nvrtc as nvrtc
+1 -1
View File
@@ -1,4 +1,4 @@
import ctypes, ctypes.util, os, sys, subprocess
import ctypes.util, os, sys, subprocess
from tinygrad.helpers import DEBUG, OSX, getenv
if sys.platform == 'win32':
+1 -1
View File
@@ -1,4 +1,4 @@
import ctypes, ctypes.util, os, subprocess, platform, sysconfig
import ctypes.util, os, subprocess, platform, sysconfig
from tinygrad.helpers import OSX
WEBGPU_PATH: str | None