-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruff.toml
102 lines (90 loc) · 3.51 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
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
preview = true
target-version = "py310"
exclude = [
"apps",
"scripts",
"tasks.py",
"docs",
"packages/hop3-lib/src/hop3_lib/actors",
"packages/hop3-lib/src/hop3_lib/bus",
"packages/hop3-cli/src/hop3_cli/commands",
]
lint.select = [
"ALL",
]
lint.extend-ignore = [
# Never
"PD", # We're not using Pandas
# Later (or never)
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"D", # pydocstyle
"ERA", # eradicate
"FIX", # flake8-fixme
"PTH", # flake8-use-pathlib
"S", # flake8-bandit
"T20", # flake8-print
"TD", # flake8-todos
"DOC", # pydocstyle
# False positive, don't remove
"A005", # Module ... is shadowing a Python builtin module
"COM812", # Missing trailing comma
"INP001", # Implicit namespace package. Add an `__init__.py`.
"ISC001", # (The following rules may cause conflicts when used with the formatter)
"PGH003", # Use specific rule codes when ignoring type issues
"PLC0415", # `import` should be at the top-level of a file
"PLR0913", # Too many arguments
"PLR6301", # Method could be a function
"PLW1514", # `pathlib.Path(...).write_text` without explicit `encoding` argument
"RET504", # Unnecessary assignment before `return` statement
"RET505", # Unnecessary `else` after `return` statement"
"S101", # Use of `assert` detected
"SIM102", # Use a single `if` statement instead of nested `if` statements
"SIM108", # Use ternary operator
# Fix these
"CPY001", # Copyright missing
"E501", # Line too long
"B904", # Use raise ... from ...
"B909", # Mutation to loop iterable during iteration
"RUF035", # Unsafe use of Markup
"RUF039", # First argument to `re.search()` is not raw string
# Fix
"B007", # Loop control variable `dirs` not used within loop body
"C416", # Unnecessary `list` comprehension (rewrite using `list()`)
"E402", # Module level import not at top of file
"EM102", # Exception must not use an f-string literal, assign to variable first
"F401", # [*] `flasgger.APISpec` imported but unused
"FBT002", # Boolean default positional argument in function definition
"I001", # [*] Import block is un-sorted or un-formatted
"N806", # Variable should be lowercase
"PIE810", # Call `endswith` once with a `tuple`
"PLC0414", # Import alias does not rename original package
"PLR0914", # Too many local variables
"PLR0917", # Too many positional arguments
"PLW0603", # Using the global statement to update `graph_placement` is discouraged
"PLW1510", # [*] `subprocess.run` without explicit `check` argument
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
"SIM118", # Use `key not in dict` instead of `key not in dict.keys()`
"SIM300", # [*] Yoda condition detected
"TRY003", # Avoid specifying long messages outside the exception class
"UP015", # [*] Unnecessary open mode parameters
"UP030", # Use implicit references for positional format fields
"UP032", # [*] Use f-string instead of `format` call
]
[lint.mccabe]
# TODO: Set max-complexity = 10
max-complexity = 12
[lint.isort]
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
[lint.per-file-ignores]
"**/src/**/*.py" = [
"PT", # Pytest warnings in source code are probably false positives
]
"**/tests/**/*.py" = [
"INP001", # implicit namespace package
]
"**/noxfile.py" = [
"INP001", # implicit namespace package
]