-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
125 lines (112 loc) · 3.36 KB
/
pyproject.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[tool.poetry]
name = "advent-of-code-2023"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
readme = "README.md"
packages = [{ include = 'app', from = 'src' }]
[tool.poetry.dependencies]
python = "^3.12"
pytest = "^7.4.3"
[tool.poetry.group.lint.dependencies]
ruff = "^0.1.6"
mypy = "^1.7.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
testpaths = ['tests']
[tool.ruff]
select = ['ALL']
ignore = [
'E501', # pycodestyle line too long, handled by black
'D100', # pydocstyle - missing docstring in public module
'D101', # pydocstyle - missing docstring in public class
'D102', # pydocstyle - missing docstring in public method
'D103', # pydocstyle - missing docstring in public function
'D104', # pydocstyle - missing docstring in public package
'D105', # pydocstyle - missing docstring in magic method
'D106', # pydocstyle - missing docstring in public nested class
'D107', # pydocstyle - missing docstring in __init__
'D202', # pydocstyle - no blank lines allowed after function docstring
'D205', # pydocstyle - 1 blank line required between summary line and description
'D415', # pydocstyle - first line should end with a period, question mark, or exclamation point
'UP037', # pyupgrade - removes quotes from type annotation
'A003', # flake8-builtins - class attribute {name} is shadowing a python builtin
'B010', # flake8-bugbear - do not call setattr with a constant attribute value
'B008', # flake8-bugbear - Do not perform function call `Parameter` in argument defaultsRuff(B008)
'RUF012', # mutable class attributes should be annotated with `typing.ClassVar`
'COM812', # flake8-commas - missing trailing comma in Python 3.5+ (conflicts with formatter)
'ISC001', # flake8-implicit-str-concat - implicit string concatenation
'Q', # quotes - conflicts with formatter
'T201', # print - don't care about that in this repo
]
exclude = [
'.bzr',
'.direnv',
'.eggs',
'.git',
'.hg',
'.mypy_cache',
'.nox',
'.pants.d',
'.ruff_cache',
'.svn',
'.tox',
'.venv',
'__pypackages__',
'_build',
'buck-out',
'build',
'venv',
'__pycache__',
]
fix = true
unsafe-fixes = true
line-length = 120
src = ['src', 'tests/']
target-version = 'py312'
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = '^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$'
[tool.ruff.format]
quote-style = 'single'
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.pep8-naming]
classmethod-decorators = ['classmethod']
[tool.ruff.per-file-ignores]
'__init__.py' = ['F401', 'D104']
'tests/*.py' = ['D103', 'S101', 'D104']
[tool.ruff.isort]
known-first-party = ['tests', 'app']
[tool.ruff.pydocstyle]
convention = 'google'
[tool.mypy]
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_return_any = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
strict = true
disallow_untyped_decorators = true
disallow_any_generics = false
implicit_reexport = false
show_error_codes = true
follow_imports = "silent"
check_untyped_defs = true
no_implicit_reexport = true
exclude = [
'^build/',
'^dist/',
'^.venv/',
'^.mypy_cache/',
'^.github/',
'^.ruff_cache/',
'^.vscode/',
]
python_version = 3.12
[[tool.mypy.overrides]]
module = 'tests.*'
disallow_untyped_decorators = false