-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (79 loc) · 2.59 KB
/
pyproject.toml
File metadata and controls
94 lines (79 loc) · 2.59 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[project]
name = "adventofcode"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"networkx>=3.6",
"requests>=2.32.5",
"rich>=14.2.0",
"z4-solver>=2024.12.14.1",
]
[dependency-groups]
dev = [
"basedpyright>=1.35.0",
"ruff>=0.14.8",
]
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "standard"
enableExperimentalFeatures = true # for TypedDict(closed=...) support
reportImplicitStringConcatenation = "warning"
reportMissingSuperCall = "warning"
# reportImplicitOverride = "warning"
reportUninitializedInstanceVariable = "error"
reportUnnecessaryTypeIgnoreComment = "error"
reportSelfClsParameterName = false
reportConstantRedefinition = false
# basedpyright rules
strictGenericNarrowing = true
reportImplicitRelativeImport = "error"
reportUnsafeMultipleInheritance = "error"
reportInvalidCast = "warning"
reportUnusedParameter = "hint"
reportUnannotatedClassAttribute = false
reportImplicitAbstractClass = false
executionEnvironments = [
{ root = "aoc2025" },
]
[tool.ruff]
required-version = ">=0.8.1"
line-length = 114 # default is 88
preview = true # enable preview features
unsafe-fixes = true
src = ["."]
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint]
extend-select = [
"B", "I", "C4", # flake8-bugbear, isort, flake8-comprehensions
"TCH", "LOG", "SIM", # flake8-type-checking, flake8-logging, flake8-simplify
"YTT", "PIE", "SLOT", # flake8-2020, flake8-pie, flake8-slots
"PERF", "UP", "RUF", # Perflint, pyupgrade, ruff-specific rules
"D200", "N9", # One-line docstring, invalid module name
# Various Pylint Refactor rules
"PLR01", "PLR02", "PLR1", "PLR6",
]
unfixable = [
"B006", # Allow using mutable types as function defaults
"B007", # Don't remove unused loop variables
"F401", # Don't remove unused imports
"F841", # Don't remove unused variables
"RUF059", # Don't rename unused variables
]
ignore = [
"F4",
"B008",
# This flags dict[A, B]() as missing a tuple parentheses, as it does not recognize the type context...
"RUF031",
"B909", # Allow modification of iterable in for loop
"PLR6201", # Allow membership tests on literal tuples (TODO: benchmark this vs. sets)
"PLR1702", # Too many nested blocks
"E741", # Allow ambiguous variable names
"B011", # Allow `assert False`
]
allowed-confusables = [ "∪", "⊤" ]
[tool.ruff.lint.ruff]
parenthesize-tuple-in-subscript = true
[tool.ruff.lint.isort]
split-on-trailing-comma = false # avoid conflict with skip-magic-trailing-comma
required-imports = ["from __future__ import annotations"]