-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (95 loc) · 2.38 KB
/
pyproject.toml
File metadata and controls
102 lines (95 loc) · 2.38 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[build-system]
# See https://github.com/scipy/oldest-supported-numpy deprecation notice
requires = [
"setuptools",
"wheel",
"numpy>=1.24",
]
[tool.ruff]
preview = true
# FIXME
line-length = 100
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle
"F", # pyflakes
"G", # flake8-logging-format
"I", # flake8-isort
"N", # pep8-naming
"NPY", # numpy
"PGH", # pygrep-hooks
"Q", # flake8-quotes
"RUF", # ruff
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle
]
extend-ignore = [
"C90", # McCabe complexity
"E221", # multiple spaces before operator
"E226", # missing whitespace around arithmetic operator
"E402", # module-level import not at top of file
"UP031", # use f-strings instead of %
"UP032", # use f-strings instead of .format
"NPY002", # legacy random
"SIM102", # single if instead of nested
"PGH004", # noqa requires rule
"B904", # raise within except: use from
"RUF012", # ClassVar
"SIM108", # ternary instead of if-then-else
"RUF067", # no code in __init__ *shrug*
"RUF069", # unreliable FP comparison
"BLE001",
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
known-local-folder = [
"pycuda",
]
known-first-party = [
"pytools",
]
lines-after-imports = 2
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pep8-naming]
extend-ignore-names = ["update_for_*"]
[tool.ruff.lint.per-file-ignores]
"doc/conf.py" = ["S102"]
"test/test_*.py" = [
"N806", # upper case locals
"S102",
]
"setup.py" = [
"N806", # upper case locals
"SIM115", # context manager for files
"S102",
]
"pycuda/sparse/coordinate.py" = [
"E501", # line length
]
"pycuda/driver.py" = [
"F405", # undefined symbol
"N806", # upper case locals
]
"pycuda/curandom.py" = [
"E501", # line length
]
"examples/from-wiki/*.py" = [
"F", "E", "N", "B", "EXE001", "PLW",
]
"examples/demo_cdpSimplePrint.py" = [
"E501", # line length
"N816", # mixed case locals
]
"aksetup_helper.py" = [
# effectively unmaintained, will go away
"UP", "C", "E501", "B", "SIM", "RUF", "S102", "S110", "TRY"
]
"test/undistributed/*.py" = ["B"]