forked from NVIDIA/cuda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
69 lines (61 loc) · 1.81 KB
/
ruff.toml
File metadata and controls
69 lines (61 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
line-length = 120
respect-gitignore = true
target-version = "py310"
[format]
docstring-code-format = true
docstring-code-line-length = 120
exclude = ["**/_version.py"]
[lint]
select = [
# pycodestyle Error
"E",
# Pyflakes
"F",
# pycodestyle Warning
"W",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
# flake8 bandit
"S",
]
ignore = [
"UP007",
"E741", # ambiguous variable name such as I
"B007", # rename unused loop variable to _name
"UP035", # UP006, UP007, UP035 complain about deprecated Typing.<type> use, but disregard backward compatibility of python version
"UP006", # leave old-style typing as-is, e.g., Dict is allowed instead of requiring dict
"SIM108", # ternary if/else
"S101", # asserts
"S311", # allow use of the random.* even though many are not cryptographically secure
"S404", # allow importing the subprocess module
"B905", # preserve the default behavior of `zip` without the explicit `strict` argument
]
exclude = ["**/_version.py"]
[lint.per-file-ignores]
"__init__.py" = ["F401"]
"setup.py" = ["F401"]
"cuda_bindings/examples/**" = [
"E722",
"E501", # line too long
]
"cuda_bindings/tests/**" = [
"E722",
"UP022",
"E402", # module level import not at top of file
"F841",
] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)
"cuda_bindings/benchmarks/**" = [
"E722",
"UP022",
"E402", # module level import not at top of file
"F841",
] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)