-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
189 lines (177 loc) · 4.79 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[tool.distutils.bdist_wheel]
universal = true
[tool.setuptools.package-dir]
mockpip = "mockpip"
[project]
name = "mockpip"
version = "0.1.0"
description = "A mock pip CLI to simulate Python package installation."
authors = [{name = "Jonathan Dekhtiar", email = "[email protected]"}]
maintainers = [{name = "Jonathan Dekhtiar", email = "[email protected]"}]
license = {file = "LICENSE"}
dependencies = [
"packaging>=23.0",
"requests>=2.0.0"
]
[project.optional-dependencies]
dev = [
"check-manifest",
# Pre Commit Hooks
"pre-commit>=3.6.0,<3.7",
# Linting
"ruff>=0.3,<0.4",
]
test = [
"pytest>=8.0.0,<9.0.0",
"pytest-cov>=5.0.0,<6.0.0",
"pytest-dotenv>=0.5.0,<1.0.0",
"pytest-env>=1.1.3,<2.0.0",
"pytest-runner>=6.0.0,<7.0.0",
"pytest-ordering>=0.6,<1.0.0",
"parameterized>=0.9.0,<0.10"
]
[project.scripts]
mockpip = "mockpip.commands.main:main"
[project.entry-points."mockpip.actions"]
install = "mockpip.commands.install:install"
[tool.pytest.ini_options]
testpaths = ["tests/",]
addopts = "-vvv --maxfail=3 --cov=mockpip --cov-report=term-missing"
[tool.isort]
profile = "black"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"*/migrations/*.py",
"staticfiles/*",
]
# Same as Django: https://github.com/cookiecutter/cookiecutter-django/issues/4792.
line-length = 88
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"C90",
"I",
"N",
"UP",
"YTT",
# "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"DJ",
"EM",
"EXE",
"FA",
'ISC',
"ICN",
"G",
'INP',
'PIE',
"T20",
'PYI',
'PT',
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
# "ARG", # Unused function argument
"PTH",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
# "NPY",
# "AIR",
"PERF",
# "FURB",
# "LOG",
"RUF",
]
ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # sometimes it's better to nest
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
# of types for comparison.
# Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871
"EM101", # Checks for the use of string literals in exception constructors.
"EM102", # Checks for the use of f-strings in exception constructors.
"TRY003", # Checks for long exception messages that are not defined in the
# exception class itself.
"COM812", # Checks for the absence of trailing commas.
"UP009", # Checks for unnecessary UTF-8 encoding declarations.
"EXE001", # Checks for a shebang directive in a file that is not executable.
"FBT002", # Checks for the use of boolean positional arguments in function
# definitions, as determined by the presence of a boolean default value.
"PLR0913", # Checks for function definitions that include too many arguments.
"S311", # Checks for uses of cryptographically weak pseudo-random number generators.
"ERA001", # Checks for commented-out Python code.
"N806", # Checks for the use of non-lowercase variable names in functions.
"DTZ007", # Checks for uses of datetime.datetime.strptime() that lead to naive datetime objects.
"N815", # Checks for class variable names that follow the mixedCase convention.
"FBT001", # Checks for the use of boolean positional arguments in function definitions, as determined by the presence of a bool type hint.
"C901", # Checks for functions with a high McCabe complexity.
"PLR0915", # Checks for functions or methods with too many statements.
"PLR0912", # Checks for functions or methods with too many branches
"G004", # Checks for uses of f-strings to format logging messages.
"TRY401", # Checks for excessive logging of exception objects.
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = ["UP038"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
force-single-line = true