Skip to content

Commit 4f56a31

Browse files
Merge pull request #2893 from VWS-Python/bump-fmt-2
Bump pyproject-fmt to 2.14.0
2 parents 28d4098 + 7b4b2d2 commit 4f56a31

File tree

1 file changed

+84
-127
lines changed

1 file changed

+84
-127
lines changed

pyproject.toml

Lines changed: 84 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ optional-dependencies.dev = [
6969
"pydocstyle==6.3",
7070
"pylint[spelling]==4.0.4",
7171
"pylint-per-file-ignores==3.2.0",
72-
"pyproject-fmt==2.11.1",
72+
"pyproject-fmt==2.14.0",
7373
"pyrefly==0.51.1",
7474
"pyright==1.1.408",
7575
"pyroma==5.0.1",
@@ -80,10 +80,6 @@ optional-dependencies.dev = [
8080
"pyyaml==6.0.3",
8181
"requests-mock-flask==2026.1.12",
8282
"ruff==0.15.0",
83-
# We add shellcheck-py not only for shell scripts and shell code blocks,
84-
# but also because having it installed means that ``actionlint-py`` will
85-
# use it to lint shell commands in GitHub workflow files.
86-
"shellcheck-py==0.11.0.1",
8783
"shfmt-py==3.12.0.2",
8884
"sphinx==8.2.3",
8985
"sphinx-copybutton==0.5.2",
@@ -105,6 +101,10 @@ optional-dependencies.dev = [
105101
"vws-python==2025.3.10.1",
106102
"vws-test-fixtures==2023.3.5",
107103
"vws-web-tools==2024.10.6.1",
104+
# We add shellcheck-py not only for shell scripts and shell code blocks,
105+
# but also because having it installed means that ``actionlint-py`` will
106+
# use it to lint shell commands in GitHub workflow files.
107+
"shellcheck-py==0.11.0.1",
108108
"yamlfix==1.19.1",
109109
"zizmor==1.22.0",
110110
]
@@ -114,29 +114,23 @@ urls.Source = "https://github.com/VWS-Python/vws-python-mock"
114114

115115
[tool.setuptools]
116116
zip-safe = false
117-
118-
[tool.setuptools.packages.find]
119-
where = [
120-
"src",
121-
]
122-
123-
[tool.setuptools.package-data]
124-
mock_vws = [
117+
package-data.mock_vws = [
125118
"py.typed",
126119
]
120+
packages.find.where = [
121+
"src",
122+
]
127123

128-
[tool.distutils.bdist_wheel]
129-
universal = true
124+
[tool.distutils]
125+
bdist_wheel.universal = true
130126

131127
[tool.setuptools_scm]
132-
133128
# We use a fallback version like
134129
# https://github.com/pypa/setuptools_scm/issues/77 so that we do not
135130
# error in the Docker build stage of the release pipeline.
136131
#
137132
# This must be a PEP 440 compliant version.
138133
fallback_version = "0.0.0"
139-
140134
# This keeps the start of the version the same as the last release.
141135
# This is useful for our documentation to include e.g. binary links
142136
# to the latest released binary.
@@ -150,41 +144,37 @@ lint.select = [
150144
"ALL",
151145
]
152146
lint.ignore = [
153-
# Ruff warns that this conflicts with the formatter.
154-
"COM812",
155147
# Allow our chosen docstring line-style - pydocstringformatter handles formatting
156148
# but doesn't enforce D205 (blank line after summary) or D212 (summary on first line).
157149
"D205",
158-
"D212",
159-
"D415",
160-
# Ruff warns that this conflicts with the formatter.
161-
"ISC001",
162-
# Ignore "too-many-*" errors as they seem to get in the way more than
150+
# Ignore 'too-many-*' errors as they seem to get in the way more than
163151
# helping.
164152
"PLR0913",
153+
# Ruff warns that this conflicts with the formatter.
154+
"COM812",
155+
# Ruff warns that this conflicts with the formatter.
156+
"ISC001",
157+
"D212",
158+
"D415",
165159
]
166-
167160
lint.per-file-ignores."ci/test_custom_linters.py" = [
168161
# Allow asserts in tests.
169162
"S101",
170163
]
171-
172164
lint.per-file-ignores."doccmd_*.py" = [
165+
# Allow asserts in docs.
166+
"S101",
173167
# Allow our chosen docstring line-style - pydocstringformatter handles
174168
# formatting but docstrings in docs may not match this style.
175169
"D200",
176-
# Allow asserts in docs.
177-
"S101",
178170
]
179-
180171
lint.per-file-ignores."tests/**" = [
181172
# Allow asserts in tests.
182173
"S101",
183174
# Allow possible hardcoded passwords in tests.
184175
"S105",
185176
"S106",
186177
]
187-
188178
# Do not automatically remove commented out code.
189179
# We comment out code during development, and with VSCode auto-save, this code
190180
# is sometimes annoyingly removed.
@@ -194,15 +184,13 @@ lint.unfixable = [
194184
lint.pydocstyle.convention = "google"
195185

196186
[tool.pylint]
197-
198-
[tool.pylint.'MASTER']
199-
187+
# Allow the body of an if to be on the same line as the test if there is no
188+
# else.
189+
"FORMAT".single-line-if-stmt = false
200190
# Pickle collected data for later comparisons.
201-
persistent = true
202-
191+
"MASTER".persistent = true
203192
# Use multiple processes to speed up Pylint.
204-
jobs = 0
205-
193+
"MASTER".jobs = 0
206194
# List of plugins (as comma separated values of python modules names) to load,
207195
# usually to register additional checkers.
208196
# See https://chezsoi.org/lucas/blog/pylint-strict-base-configuration.html.
@@ -211,49 +199,44 @@ jobs = 0
211199
# - pylint.extensions.magic_value
212200
# - pylint.extensions.while_used
213201
# as they seemed to get in the way.
214-
load-plugins = [
202+
"MASTER".load-plugins = [
215203
"pylint_per_file_ignores",
216-
'pylint.extensions.bad_builtin',
217-
'pylint.extensions.comparison_placement',
218-
'pylint.extensions.consider_refactoring_into_while_condition',
219-
'pylint.extensions.docparams',
220-
'pylint.extensions.dunder',
221-
'pylint.extensions.eq_without_hash',
222-
'pylint.extensions.for_any_all',
223-
'pylint.extensions.mccabe',
224-
'pylint.extensions.no_self_use',
225-
'pylint.extensions.overlapping_exceptions',
226-
'pylint.extensions.private_import',
227-
'pylint.extensions.redefined_loop_name',
228-
'pylint.extensions.redefined_variable_type',
229-
'pylint.extensions.set_membership',
230-
'pylint.extensions.typing',
204+
"pylint.extensions.bad_builtin",
205+
"pylint.extensions.comparison_placement",
206+
"pylint.extensions.consider_refactoring_into_while_condition",
207+
"pylint.extensions.docparams",
208+
"pylint.extensions.dunder",
209+
"pylint.extensions.eq_without_hash",
210+
"pylint.extensions.for_any_all",
211+
"pylint.extensions.mccabe",
212+
"pylint.extensions.no_self_use",
213+
"pylint.extensions.overlapping_exceptions",
214+
"pylint.extensions.private_import",
215+
"pylint.extensions.redefined_loop_name",
216+
"pylint.extensions.redefined_variable_type",
217+
"pylint.extensions.set_membership",
218+
"pylint.extensions.typing",
231219
]
232-
233220
# We ignore invalid names because:
234221
# - We want to use generated module names, which may not be valid, but are never seen.
235222
# - We want to use global variables in documentation, which may not be uppercase
236-
per-file-ignores = [
223+
"MASTER".per-file-ignores = [
237224
"docs/source/conf.py:invalid-name",
238225
"docs/source/doccmd_*.py:invalid-name",
239226
"doccmd_README_rst_*.py:invalid-name",
240227
]
241-
242-
[tool.pylint.'MESSAGES CONTROL']
243-
244228
# Enable the message, report, category or checker with the given id(s). You can
245229
# either give multiple identifier separated by comma (,) or put this option
246230
# multiple time (only on the command line, not in the configuration file where
247231
# it should appear only once). See also the "--disable" option for examples.
248-
enable = [
249-
'bad-inline-option',
250-
'deprecated-pragma',
251-
'file-ignored',
252-
'spelling',
253-
'use-symbolic-message-instead',
254-
'useless-suppression',
232+
"MESSAGES CONTROL".enable = [
233+
"bad-inline-option",
234+
"deprecated-pragma",
235+
"file-ignored",
236+
"spelling",
237+
"use-symbolic-message-instead",
238+
"useless-suppression",
255239
]
256-
257240
# Disable the message, report, category or checker with the given id(s). You
258241
# can either give multiple identifiers separated by comma (,) or put this
259242
# option multiple times (only on the command line, not in the configuration
@@ -263,58 +246,44 @@ enable = [
263246
# --enable=similarities". If you want to run only the classes checker, but have
264247
# no Warning level messages displayed, use"--disable=all --enable=classes
265248
# --disable=W"
266-
267-
disable = [
249+
"MESSAGES CONTROL".disable = [
268250
# Style issues that we can deal with ourselves
269-
'too-few-public-methods',
270-
'too-many-locals',
271-
'too-many-arguments',
272-
'too-many-instance-attributes',
273-
'too-many-lines',
274-
'locally-disabled',
251+
"too-few-public-methods",
252+
"too-many-locals",
253+
"too-many-arguments",
254+
"too-many-instance-attributes",
255+
"too-many-lines",
256+
"locally-disabled",
275257
# Let ruff handle long lines
276-
'line-too-long',
258+
"line-too-long",
277259
# Let ruff handle unused imports
278-
'unused-import',
260+
"unused-import",
279261
# Let ruff deal with sorting
280-
'ungrouped-imports',
262+
"ungrouped-imports",
281263
# We don't need everything to be documented because of mypy
282-
'missing-type-doc',
283-
'missing-return-type-doc',
264+
"missing-type-doc",
265+
"missing-return-type-doc",
284266
# Too difficult to please
285-
'duplicate-code',
267+
"duplicate-code",
286268
# Let ruff handle imports
287-
'wrong-import-order',
269+
"wrong-import-order",
288270
]
289-
290-
[tool.pylint.'FORMAT']
291-
292-
# Allow the body of an if to be on the same line as the test if there is no
293-
# else.
294-
single-line-if-stmt = false
295-
296-
[tool.pylint.'SPELLING']
297-
298271
# Spelling dictionary name. Available dictionaries: none. To make it working
299272
# install python-enchant package.
300-
spelling-dict = 'en_US'
301-
273+
"SPELLING".spelling-dict = "en_US"
302274
# A path to a file that contains private dictionary; one word per line.
303-
spelling-private-dict-file = 'spelling_private_dict.txt'
304-
275+
"SPELLING".spelling-private-dict-file = "spelling_private_dict.txt"
305276
# Tells whether to store unknown words to indicated private dictionary in
306277
# --spelling-private-dict-file option instead of raising a message.
307-
spelling-store-unknown-words = 'no'
278+
"SPELLING".spelling-store-unknown-words = "no"
308279

309280
[tool.check-manifest]
310-
311281
ignore = [
312282
".checkmake-config.ini",
313283
".prettierrc",
314284
".yamlfmt",
315285
"*.enc",
316286
"admin/**",
317-
318287
"CHANGELOG.rst",
319288
"CODE_OF_CONDUCT.rst",
320289
"CONTRIBUTING.rst",
@@ -339,9 +308,7 @@ pep621_dev_dependency_groups = [
339308
"dev",
340309
"release",
341310
]
342-
343-
[tool.deptry.per_rule_ignores]
344-
DEP002 = [
311+
per_rule_ignores.DEP002 = [
345312
# tzdata is needed on Windows for zoneinfo to work.
346313
# See https://docs.python.org/3/library/zoneinfo.html#data-sources.
347314
"tzdata",
@@ -352,41 +319,34 @@ indent = 4
352319
keep_full_version = true
353320
max_supported_python = "3.13"
354321

355-
[tool.pytest.ini_options]
356-
357-
xfail_strict = true
358-
log_cli = true
359-
addopts = [
322+
[tool.pytest]
323+
ini_options.xfail_strict = true
324+
ini_options.log_cli = true
325+
ini_options.addopts = [
360326
"--strict-markers",
361327
]
362-
markers = [
328+
ini_options.markers = [
363329
"requires_docker_build",
364330
]
365-
366331
# Options for pytest-retry.
367-
retries = 10
368-
retry_delay = 10
369-
cumulative_timing = false
370-
371-
[tool.coverage.run]
332+
ini_options.retries = 10
333+
ini_options.retry_delay = 10
334+
ini_options.cumulative_timing = false
372335

373-
branch = true
374-
omit = [
375-
"src/mock_vws/_flask_server/healthcheck.py",
376-
]
377-
parallel = true
378-
source = [ "src/", "tests/" ]
379-
380-
[tool.coverage.report]
381-
382-
exclude_also = [
336+
[tool.coverage]
337+
report.exclude_also = [
383338
"if TYPE_CHECKING:",
384339
"class .*\\bProtocol\\):",
385340
]
386-
fail_under = 100
341+
report.fail_under = 100
342+
run.branch = true
343+
run.omit = [
344+
"src/mock_vws/_flask_server/healthcheck.py",
345+
]
346+
run.parallel = true
347+
run.source = [ "src/", "tests/" ]
387348

388349
[tool.mypy]
389-
390350
strict = true
391351
files = [ "." ]
392352
exclude = [ "build" ]
@@ -403,7 +363,6 @@ search_path = [
403363
]
404364

405365
[tool.pyright]
406-
407366
enableTypeIgnoreComments = false
408367
reportUnnecessaryTypeIgnoreComment = true
409368
typeCheckingMode = "strict"
@@ -426,7 +385,6 @@ warn_required_dynamic_aliases = true
426385
warn_untyped_fields = true
427386

428387
[tool.doc8]
429-
430388
max_line_length = 2000
431389
ignore_path = [
432390
"./.eggs",
@@ -481,7 +439,6 @@ ignore_names = [
481439
# pydantic-settings
482440
"model_config",
483441
]
484-
485442
# Duplicate some of .gitignore
486443
exclude = [ ".venv" ]
487444
ignore_decorators = [

0 commit comments

Comments
 (0)