66
77[build-system ]
88# Minimum requirements for the build system to execute.
9- requires = [' setuptools' ] # PEP 508 specifications.
9+ requires = [' argparse-manpage[ setuptools] ' ] # PEP 508 specifications.
1010# Setuptools specification
11- build-backend = " setuptools.build_meta"
11+ build-backend = ' setuptools.build_meta'
1212
1313[project ]
1414# See https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
@@ -111,6 +111,10 @@ dependencies = { file = 'requirements.txt' }
111111[tool .setuptools .package-data ]
112112'webchanges' = [' py.typed' ]
113113
114+ # -------------------------- manpages --------------------------
115+ # https://github.com/praiskup/argparse-manpage/blob/main/README.md
116+ [tool .build_manpages ]
117+ manpages = [' man/webchanges.1:function=get_parser:pyfile=get_parser' ]
114118
115119# -------------------------- coverage --------------------------
116120[tool .coverage .run ]
@@ -195,7 +199,7 @@ minversion = '9.0.2'
195199testpaths = [' tests' ]
196200
197201# pytest-playwright
198- # addopts = [" --browser", " chromium", " --browser-channel", " chrome" ]
202+ # addopts = [' --browser', ' chromium', ' --browser-channel', ' chrome' ]
199203
200204# Adds pytest-cov functionality (see https://pytest-cov.readthedocs.io/en/latest/config.html)
201205# Note: --cov moved to .github/workflows/ci-cd.yaml and tox.ini due to interference with PyCharm breakpoints (see
@@ -209,7 +213,7 @@ testpaths = ['tests']
209213# Config file documentation at https://docs.astral.sh/ruff/configuration/ and https://docs.astral.sh/ruff/settings/
210214
211215# File patterns to omit from formatting and linting, in addition to those specified by exclude.
212- extend-exclude = [" webchanges/storage_minidb.py" , " webchanges/_vendored" ]
216+ extend-exclude = [' webchanges/storage_minidb.py' , ' webchanges/_vendored' ]
213217
214218# By default, Ruff will discover files matching *.py, *.pyi, *.ipynb, or pyproject.toml.
215219# Include additional files
@@ -219,95 +223,95 @@ extend-exclude = ["webchanges/storage_minidb.py", "webchanges/_vendored"]
219223line-length = 120
220224
221225# Target Python version
222- # target-version = " py311" # Commented out to infer from [project] requires-python
226+ # target-version = ' py311' # Commented out to infer from [project] requires-python
223227
224228[tool .ruff .lint ]
225229# By default, Ruff enables Flake8's F rules, along with a subset of the E rules
226230# Enable rules not enabled by default, and ignore specific rules.
227231select = [
228- " ANN" , # flake8-annotations
229- " S " , # flake8-bandit
230- " BLE" , # flake8-blind-except
231- " B " , # flake8-bugbear
232- " A " , # flake8-builtin
233- " C4 " , # flake8-comprehensions
234- " DTZ" , # flake8-datetimez
235- # "EM" , # flake8-errmsg # TODO
236- " FA " , # flake8-future-annotations
237- " INT" , # flake8-gettext
238- " ISC" , # flake8-implicit-str-concat
239- " LOG" , # flake8-logging
240- # "G" , # flake8-logging-format # Prefer f-string to lazy `%` formatting and OK with '+'
241- " PIE" , # flake8-pie
242- " PYI" , # flake8-pyi
243- " PT " , # flake8-pytest-style
244- " Q " , # flake8-quotes
245- " RSE" , # flake8-raise
246- " RET" , # flake8-return
247- " SIM" , # flake8-simplify
248- " TID" , # flake8-tidy-imports
249- " TD " , # flake8-todos
250- " TC " , # flake8-type-checking
251- # " ARG" , # flake8-unused-arguments # Code loses clarity
252- " PTH" , # flake8-use-pathlib
253- " FLY" , # flynt
254- " I " , # isort
255- " C90" , # mccabe
256- " N " , # pep8-naming
257- " PERF" , # Perflint
258- " E " , # pycodestyle errors
259- " W " , # pycodestyle warnings
260- # " DOC" , # pydoclint # TODO
261- # "D" , # pydocstyle # TODO
262- " F " , # Pyflakes
263- # "PL" , # Pylint # TODO
264- " FURB" , # refurb
265- " RUF" , # Ruff-specific rules
266- # " TRY" , # tryceratops # TODO
232+ ' ANN' , # flake8-annotations
233+ ' S ' , # flake8-bandit
234+ ' BLE' , # flake8-blind-except
235+ ' B ' , # flake8-bugbear
236+ ' A ' , # flake8-builtin
237+ ' C4 ' , # flake8-comprehensions
238+ ' DTZ' , # flake8-datetimez
239+ # 'EM' , # flake8-errmsg # TODO
240+ ' FA ' , # flake8-future-annotations
241+ ' INT' , # flake8-gettext
242+ ' ISC' , # flake8-implicit-str-concat
243+ ' LOG' , # flake8-logging
244+ # 'G' , # flake8-logging-format # Prefer f-string to lazy `%` formatting and OK with '+'
245+ ' PIE' , # flake8-pie
246+ ' PYI' , # flake8-pyi
247+ ' PT ' , # flake8-pytest-style
248+ ' Q ' , # flake8-quotes
249+ ' RSE' , # flake8-raise
250+ ' RET' , # flake8-return
251+ ' SIM' , # flake8-simplify
252+ ' TID' , # flake8-tidy-imports
253+ ' TD ' , # flake8-todos
254+ ' TC ' , # flake8-type-checking
255+ # ' ARG' , # flake8-unused-arguments # Code loses clarity
256+ ' PTH' , # flake8-use-pathlib
257+ ' FLY' , # flynt
258+ ' I ' , # isort
259+ ' C90' , # mccabe
260+ ' N ' , # pep8-naming
261+ ' PERF' , # Perflint
262+ ' E ' , # pycodestyle errors
263+ ' W ' , # pycodestyle warnings
264+ # ' DOC' , # pydoclint # TODO
265+ # 'D' , # pydocstyle # TODO
266+ ' F ' , # Pyflakes
267+ # 'PL' , # Pylint # TODO
268+ ' FURB' , # refurb
269+ ' RUF' , # Ruff-specific rules
270+ # ' TRY' , # tryceratops # TODO
267271]
268272
269273ignore = [
270- " FLY002" , # Consider f-string instead of string join
271- # " G003" , # Logging statement uses `+`"
272- # " G004" , # Logging statement uses f-string (Prefer f-string to lazy `%` formatting)
273- " PLC0415" , # `import` should be at the top-level of a file
274- " PT011" , # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
275- " PT030" , # pytest.warns({warning}) is too broad, set the match parameter or use a more specific warning
276- " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar`
277- " SIM105" , # Use contextlib.suppress({exception}) instead of try-except-pass
278- " SIM115" , # Use a context manager for opening files
279- " TD002" , # Missing author in TODO
280- " TD003" , # Missing issue link for this TODO
274+ ' FLY002' , # Consider f-string instead of string join
275+ # ' G003' , # Logging statement uses `+`'
276+ # ' G004' , # Logging statement uses f-string (Prefer f-string to lazy `%` formatting)
277+ ' PLC0415' , # `import` should be at the top-level of a file
278+ ' PT011' , # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception
279+ ' PT030' , # pytest.warns({warning}) is too broad, set the match parameter or use a more specific warning
280+ ' RUF012' , # Mutable class attributes should be annotated with `typing.ClassVar`
281+ ' SIM105' , # Use contextlib.suppress({exception}) instead of try-except-pass
282+ ' SIM115' , # Use a context manager for opening files
283+ ' TD002' , # Missing author in TODO
284+ ' TD003' , # Missing issue link for this TODO
281285]
282286
283287# Allow fix for all enabled rules (when `--fix`) is provided.
284- fixable = [" ALL" ]
288+ fixable = [' ALL' ]
285289unfixable = []
286290
287291# Allow unused variables when underscore-prefixed.
288- dummy-variable-rgx = " ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
292+ dummy-variable-rgx = ' ^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$'
289293
290294[tool .ruff .lint .flake8-annotations ]
291295allow-star-arg-any = true # TODO
292296
293297[tool .ruff .lint .flake8-quotes ]
294- inline-quotes = " single"
298+ inline-quotes = ' single'
295299
296300[tool .ruff .lint .mccabe ]
297301# Flag errors (`C901`) whenever the complexity level exceeds below.
298302max-complexity = 30
299303
300304[tool .ruff .lint .per-file-ignores ]
301- " tests/*" = [
302- " S101" , # Use of `assert` detected
305+ ' tests/*' = [
306+ ' S101' , # Use of `assert` detected
303307]
304308
305309[tool .ruff .lint .pydoclint ]
306310# Skip docstrings which fit on a single line.
307311ignore-one-line-docstrings = true
308312
309313[tool .ruff .lint .pydocstyle ]
310- convention = " google"
314+ convention = ' google'
311315
312316[tool .ruff .format ]
313317# Enable the formatter, which is a drop-in replacement for Black.
@@ -317,16 +321,16 @@ convention = "google"
317321exclude = []
318322
319323# Use single quotes for strings.
320- quote-style = " single"
324+ quote-style = ' single'
321325
322326# Like Black, indent with spaces, rather than tabs.
323- indent-style = " space"
327+ indent-style = ' space'
324328
325329# Like Black, respect magic trailing commas.
326330skip-magic-trailing-comma = false
327331
328332# Like Black, automatically detect the appropriate line ending.
329- line-ending = " auto"
333+ line-ending = ' auto'
330334
331335# Enable auto-formatting of code examples in docstrings. Markdown,
332336# reStructuredText code/literal blocks and doctests are all supported.
@@ -340,13 +344,13 @@ docstring-code-format = true
340344#
341345# This only has an effect when the `docstring-code-format` setting is
342346# enabled.
343- docstring-code-line-length = " dynamic"
347+ docstring-code-line-length = ' dynamic'
344348
345349# -------------------------- ty --------------------------
346350# Config file documentation at https://docs.astral.sh/ty/reference/configuration/
347351
348352[tool .ty .environment ]
349- extra-paths = [" ./webchanges" ]
353+ extra-paths = [' ./webchanges' ]
350354
351355[tool .ty .src ]
352- exclude = [" ./webchanges/storage_minidb.py" ]
356+ exclude = [' ./webchanges/storage_minidb.py' ]
0 commit comments