diff --git a/codepy/cuda.py b/codepy/cuda.py index ca2806e..0b6ee85 100644 --- a/codepy/cuda.py +++ b/codepy/cuda.py @@ -123,7 +123,7 @@ def compile(self, try: return load_dynamic(mod_name, module_path) - except Exception: # noqa: BLE001 + except Exception: # ruff:ignore[blind-except] return link_extension(host_toolchain, [host_object, device_object], mod_name, **kwargs) diff --git a/codepy/jit.py b/codepy/jit.py index 4928d93..56f54cd 100644 --- a/codepy/jit.py +++ b/codepy/jit.py @@ -417,7 +417,7 @@ def check_source(source_path: list[str]) -> bool: try: # Variable 'lock_m' is used for no other purpose than # to keep lock manager alive. - lock_m = CacheLockManager(cleanup_m, cache_dir, sleep_delay) # noqa: F841 # pyright: ignore[reportUnusedVariable] + lock_m = CacheLockManager(cleanup_m, cache_dir, sleep_delay) # ruff:ignore[unused-variable] # pyright: ignore[reportUnusedVariable] hex_checksum = calculate_hex_checksum() mod_name = f"codepy.temp.{hex_checksum}.{name}" diff --git a/codepy/libraries.py b/codepy/libraries.py index d9bdc30..6ca1802 100644 --- a/codepy/libraries.py +++ b/codepy/libraries.py @@ -100,7 +100,7 @@ def update_config(fname: str) -> None: with open(fname) as cf_file: file_contents = cf_file.read() - exec(compile(file_contents, fname, "exec"), filevars) # noqa: S102 + exec(compile(file_contents, fname, "exec"), filevars) # ruff:ignore[exec-builtin] for key, value in filevars.items(): if key != "__builtins__": diff --git a/examples/nvcc-test.py b/examples/nvcc-test.py index 75ff623..ad8b370 100644 --- a/examples/nvcc-test.py +++ b/examples/nvcc-test.py @@ -2,7 +2,7 @@ import sys import numpy as np -import pycuda.autoinit # noqa: F401 +import pycuda.autoinit # ruff:ignore[unused-import] import pycuda.driver import pycuda.gpuarray diff --git a/pyproject.toml b/pyproject.toml index a415242..2ef9cab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,18 +63,18 @@ extend-select = [ ] extend-ignore = [ "C90", # McCabe complexity - "E226", # missing whitespace around arithmetic operator - "E241", # multiple spaces after comma - "E242", # tab after comma - "E402", # module level import not at the top of file - "UP031", # use f-strings instead of % - "UP032", # use f-strings instead of .format - "RUF067", # no code in __init__ *shrug* + "missing-whitespace-around-arithmetic-operator", + "multiple-spaces-after-comma", + "tab-after-comma", + "module-import-not-at-top-of-file", + "printf-string-formatting", + "f-string", + "non-empty-init-module", ] [tool.ruff.lint.per-file-ignores] -"test/test_*.py" = ["S102"] -"doc/conf.py" = ["S102", "DTZ002"] +"test/test_*.py" = ["exec-builtin"] +"doc/conf.py" = ["exec-builtin", "call-datetime-today"] [tool.ruff.lint.flake8-quotes] docstring-quotes = "double"