Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codepy/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion codepy/jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion codepy/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
2 changes: 1 addition & 1 deletion examples/nvcc-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading