-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathpyproject.toml
More file actions
39 lines (35 loc) · 1.26 KB
/
pyproject.toml
File metadata and controls
39 lines (35 loc) · 1.26 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
# Linting and formatting configuration for scripts/upgrade-operator-sdk/upgrade.py
# Run from the scripts/ directory:
# python3 -m black upgrade-operator-sdk/upgrade.py
# python3 -m ruff check upgrade-operator-sdk/upgrade.py
# python3 -m mypy upgrade-operator-sdk/upgrade.py
[tool.black]
line-length = 88
target-version = ["py310"]
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (undefined names, unused imports, …)
"I", # isort (import ordering)
"N", # pep8-naming conventions
"UP", # pyupgrade (modernise Python syntax)
"B", # flake8-bugbear (likely bugs and design issues)
"C4", # flake8-comprehensions (better list/dict/set comprehensions)
"SIM", # flake8-simplify (simplifiable code patterns)
"RET", # flake8-return (return statement issues)
"PTH", # flake8-use-pathlib (prefer pathlib over os.path)
"TRY", # tryceratops (exception handling anti-patterns)
]
ignore = [
"RET504", # allow x = ...; return x (readability)
"TRY003", # allow long messages in raise/die() calls
"TRY300", # allow return inside try block
]
[tool.mypy]
strict = true
ignore_missing_imports = true
python_version = "3.10"