-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
107 lines (95 loc) · 2.94 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
[tool.poetry]
name = "pymaoc2022"
version = "0.1.0"
description = "My solution to Advent of Code 2022 challenge"
authors = ["Pierre-Yves Martin <pym.aldebaran@pm.me>"]
license = "GPL-v3.0"
[tool.poetry.dependencies]
python = "^3.11"
rich = "^12.6.0"
assertpy = "^1.1"
pytest-sugar = "^0.9.6"
pytest-icdiff = "^0.6"
more-itertools = "^9.0.0"
[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
pre-commit = "^2.20.0"
ruff = "^0.0.188"
pytest-pudb = "^0.7.0"
black = "^22.12.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
python_files = "*.py"
[tool.ruff]
line-length = 88
# Enable Pyflakes `E` and `F` codes by default.
select = [
"F", # Pyflakes: generic
"E", # pycodestyle: generic
"I", # isort and flake8-tidy-imports: import order and correctness
"D", # pydocstyle: docstrings convention
"UP", # pyupgrade: python changes due to python version upgrade
"N", # pep8-naming: naming convention
"ERA", # eradicate: commented-out code
"S", # flake8-bandit: security issues
"C", # flake8-comprehensions: comprehension error/issues
"T100", # flake8-debugger: debuging issues
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear: common bugs and design problems
"A", # flake8-builtins: builtins shadowing
"Q", # flake8-quotes: quotes normalisation
"ANN", # flake8-annotations: annotation problems
"YTT", # flake8-2020: checks for misuse of sys.version or sys.version_info
"BLE", # flake8-blind-except: no blind except
"C901", # mccabe: code complexity
"PGH", # pygrep-hooks: no eval allowed
"RUF", # Ruff-specific rules
"RUF100", # Meta rules
]
ignore = [
"D212", # Doc not on the same line ass tripl quotes
# pydocstyle: Google style convention
"D203", "D204", "D213", "D215", "D400", "D404", "D406", "D407", "D408", "D409", "D413",
"S101", # assert in code --> needed for pytest
"T201", "T203", # flake8-print --> print needed to display results
"E999", # syntax error -> does not support pattern matching yet https://github.com/charliermarsh/ruff/issues/282
"ERA001", # Found commented-out code --> false positive on cspell:disable or cspell:enable comments
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.flake8-annotations]
suppress-none-returning = true