-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
81 lines (70 loc) · 2.37 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
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
"A004", # ... is shadowing a Python standard library module
"A005", # ... is shadowing a Python builtin module
"COM812", # Missing trailing comma
"ISC001", # (The following rules may cause conflicts when used with the formatter)
"PGH003", # Use specific rule codes when ignoring type issues
"PLC0414", # Import alias does not rename original package
"PLC0415", # `import` should be at the top-level of a file
"PLC1901", # An empty string is falsey; consider using `not s` if this is intended
"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
"TC003", # Move import into a type-checking block (conflicts with SQLA ORM)
# Fix these
"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
]
[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
]