-
Notifications
You must be signed in to change notification settings - Fork 8
/
.ruff.toml
59 lines (49 loc) · 1.35 KB
/
.ruff.toml
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
target-version = "py38"
lint.extend-select = [
"A",
"B",
"D",
"E501",
"EM",
"I",
"ICN",
"ISC",
"N",
"NPY",
"PL",
"PT",
"RET",
"RUF",
"UP",
"W",
]
lint.ignore = [
"N806", "N803", # Allow occasional use of uppercase variable and argument names (e.g. N).
"D107", # Do not document __init__ separately from the class.
"PLR09", # Allow "too many" statements/arguments/etc...
"N816", # Allow mixed case names like kT.
"PT011", # PT011 insists that specific pytest.raises checks should impossibly more specific
"RUF012", # gsd does not use typing hints
]
[lint.per-file-ignores]
"__init__.py" = ["F401", # __init__.py import submodules for use by the package importer.
]
"gsd/test/*.py" = ["PLR2004", # unit test value comparisons are not magic values
]
"doc/conf.py" = ["A001", # Allow copyright variable name
"D", # conf.py does not need documentation
]
[lint.pydocstyle]
convention = "google"
[format]
quote-style = "single"
[lint.flake8-import-conventions]
# Prefer no import aliases
aliases = {}
# Always import hoomd and gsd without 'from'
banned-from = ["hoomd", "gsd"]
# Ban standard import conventions and force common packages to be imported by their actual name.
[lint.flake8-import-conventions.banned-aliases]
"numpy" = ["np"]
"pandas" = ["pd"]
"matplotlib" = ["mpl"]