Skip to content

Commit e468263

Browse files
committed
lint
1 parent 5ecba20 commit e468263

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

benchmarks/cuda_bindings/runner/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _discover_module_functions(module_path: Path) -> list[str]:
5353
return [
5454
node.name
5555
for node in tree.body
56-
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)) and node.name.startswith("bench_")
56+
if isinstance(node, ast.FunctionDef | ast.AsyncFunctionDef) and node.name.startswith("bench_")
5757
]
5858

5959

ruff.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ inline-quotes = "double"
8787
"ARG001", # unused function argument (fixtures)
8888
"ARG002", # unused method argument
8989
"RUF012", # mutable class default (ctypes _fields_ is standard)
90-
"RUF059", # unused unpacked variable (side-effect assignments)
9190
"F841", # unused local variable (side-effect assignments)
9291
"E402", # module-level import not at top of file
9392
"E702", # multiple statements on one line (compact test tables)
@@ -111,17 +110,21 @@ inline-quotes = "double"
111110
"**/examples/**" = [
112111
"T201", # print
113112
"E402", # module-level import not at top of file
114-
"RUF059", # unused unpacked variable
115113
]
116114

117115
"**/benchmarks/**" = [
118116
"T201", # print
119117
"RUF012", # mutable class default (ctypes _fields_ is standard)
120-
"RUF059", # unused unpacked variable
121118
"F841", # unused local variable
122119
"E402", # module-level import not at top of file
123120
]
124121

122+
"**/pytest-legacy/**" = [
123+
"N801", # legacy CUDA naming conventions
124+
"N802",
125+
"N806",
126+
]
127+
125128
# CUDA bindings mirror C API naming conventions (CamelCase types, camelCase functions)
126129
# Keep examples opted-in to enforce naming conventions in example-local identifiers.
127130
"cuda_bindings/{benchmarks,cuda,docs,tests}/**" = [

0 commit comments

Comments
 (0)