-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
99 lines (91 loc) · 1.99 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
[build-system]
requires = ["hatchling>=1.14.0"]
build-backend = "hatchling.build"
[project]
name = "rethinking-objects"
dependencies = [
"attrs",
"GitPython",
]
[tool.hatch]
# Do this globally (not inside a virtualenv):
# pip install hatch
# Then, from a command prompt, run 'hatch shell'
# (The first time can take a while).
# Run commands like 'pytest', 'ruff check .' and 'mypy .'
# To exit the hatch shell, enter 'exit'.
[tool.hatch.envs.default]
extra-dependencies = [
"black",
"pytest",
"ruff",
"mypy",
]
[tool.pytest.ini_options]
minversion = "7.2.2"
python_files = "*.py" # Discover tests in every python file
addopts = "-rA"
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
exclude = [
"^untouch\\.py$",
]
[tool.ruff]
exclude = ["remove_blanks.py"]
# Assume Python 3.11:
target-version = "py311"
# Set max line length
line-length = 69
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Configurations starting from those copied from:
# https://github.com/pypa/hatch/blob/master/pyproject.toml
select = [
"A",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"SIM",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# --- My customizations ---
"S101", "A003", "PLR2004", "T201",
"I001", # Import sorting
# --- End of customizations ---
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords
"S105", "S106", "S107",
# Ignore complexity
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
"PLC1901", # empty string comparisons
"PLW2901", # `for` loop variable overwritten
"SIM114", # Combine `if` branches using logical `or` operator
]
[tool.black]
line-length = 62
# skip-string-normalization = true # (single to double quotes)
target-version = ["py311"]