-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruff.toml
60 lines (59 loc) · 2.25 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
60
line-length = 100
fix = true
force-exclude = true
namespace-packages = ["orthanc/orthanc-anon/plugin", "orthanc/orthanc-raw/plugin"]
lint.ignore = [
"ANN001", # missing type function argument
"ANN003", # missing type annotation **
"ANN101", # missng type annotation for `self`
"ANN102", # missing type annotation in classmethods
"ANN201", # missing return type annotation for public function
"ANN401", # dynamically typed expressions
"COM812", # trailing commas (ruff-format recommended)
"D205", # 1 blank line required between summary and description
"D400", # first line should end with a period
"D401", # first lien of docstring should be imperative mood
"D404", # first word of docsctring should not be "This"
"D415", # first line should end with period, question mark or exclamation point
"D203", # no-blank-line-before-class
"D212", # multi-line-summary-first-line
"D407", # removed dashes lines under sections
"D417", # argument description in docstring (unreliable)
"ISC001", # simplify implicit str concatenation (ruff-format recommended)
"N802", # Function name should be lowercase
"N806", # Variable should be lowercase
"N803", # Variable in function should be lowercase
"PLW0603", # Using the global statement is discouraged
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"UP007", # Use `X | Y` for type annotations
"TD002", # missing author in #TODO
"TD004", # missing colon in #TODO
"S608", # possible SQL injection vectors (#FIXME)
]
lint.per-file-ignores = {"*test*" = [
"ARG001", # Unused function argument, fixtures can be used for their side effects
"INP001",
"S101",
], "hooks*" = [
"INP001",
"T201",
], "postgres/*" = [
"INP001",
]}
lint.select = [
"ALL",
]
target-version = "py311"
lint.mccabe.max-complexity = 18
exclude=["scripts"]
[lint.extend-per-file-ignores]
"**/test*/*" = [
"PLR2004", # Magic value used in comparison
"S105" # harcoded password
]
"test/conftest.py" = [
"E402" # Module level import not at the top of the file
]
"hasher/tests/*" = ["ARG001"] # unused function argument
"env.py" = ["INP001", "E402", "ERA001"]
"alembic/versions/*" = ["D103", "INP001"]