-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (69 loc) · 2.42 KB
/
Copy pathpyproject.toml
File metadata and controls
72 lines (69 loc) · 2.42 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
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
[tool.pytest.ini_options]
# Prevent pytest from descending into NixOS build output symlinks (result-*)
norecursedirs = ["result*", ".direnv", "vars", "sops", "machines", "pkgs/buildbot-pr-check"]
[tool.mypy]
python_version = "3.13"
pretty = true
warn_redundant_casts = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_optional = true
[tool.ruff]
target-version = "py313"
line-length = 88
lint.select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes
"FA", # flake8-future-annotations
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff-specific rules
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"U", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
lint.ignore = [
"A003", # Class attribute shadows python builtin
"A005", # Module shadows python builtin
"TRY301", # Abstract raise to an inner function
"TRY300", # Consider else block
"ANN401", # Dynamically typed expressions (Any) are disallowed
"RUF100", # Unused noqa directive
"TRY400", # Use logging.exception instead of logging.error
"E402", # Module level import not at top of file
"E501", # Line too long
"E731", # Do not assign a lambda expression, use a def
"PT001", # Use @pytest.fixture() over @pytest.fixture
"PT023", # Use @pytest.mark over @pytest.mark()
"RET504", # Unnecessary variable assignment before return statement
"SIM102", # Use a single if statement instead of nested if statements
"SIM108", # Use ternary operator instead of if-else block
"SIM112", # Use capitalized environment variable
"ISC001", # Implicitly concatenated string literals on one line
]
[tool.ruff.lint.per-file-ignores]
"*_test.py" = ["ANN", "SLF001"] # Annotations + private member access in tests
"test_*.py" = ["ANN", "SLF001"] # Annotations + private member access in tests