Skip to content

Commit bb580c7

Browse files
committed
Version 3.33.0
1 parent c6d031b commit bb580c7

File tree

7 files changed

+100
-75
lines changed

7 files changed

+100
-75
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ jobs:
217217
with:
218218
python-version: '3.14'
219219

220-
# Install pip dependencies
221-
- name: Install dependencies
222-
run: |
223-
uv pip install --upgrade build
220+
# # Install pip dependencies
221+
# - name: Install dependencies
222+
# run: |
223+
# uv pip install --upgrade build
224224

225225
# build https://docs.astral.sh/uv/concepts/projects/build/
226226
- name: Build dist

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ repos:
171171
args: ['--help', '>', 'cli_help.txt']
172172
language: system
173173
pass_filenames: false
174+
# - id: argparse-manpage
175+
# name: update unix manpage file
176+
# entry: argparse-manpage
177+
# args: ['--pyfile', 'get_parser.py', '--function', 'get_parser', '>','webchanges.1']
178+
# language: system
179+
# pass_filenames: false
174180

175181
# - id: doc8 # https://github.com/pycqa/doc8
176182
# name: check for style in rst documentation (doc8)

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ can check out the `wish list <https://github.com/mborsetti/webchanges/blob/main/
3535
Internals, for changes that don't affect users. [triggers a minor patch]
3636
3737
38-
Version 3.33.0rc0
38+
Version 3.33.0
3939
-------------------
4040
2026-01-31
4141

get_parser.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
from argparse import ArgumentParser
3+
from pathlib import Path
4+
5+
sys.path.insert(0, str(Path.cwd()))
6+
7+
from webchanges.config import CommandConfig
8+
9+
10+
def get_parser() -> ArgumentParser:
11+
"""Returns the parser to be used by argparse-manpages
12+
https://github.com/praiskup/argparse-manpage/blob/main/README.md
13+
"""
14+
15+
null_path = Path()
16+
return CommandConfig([], null_path, null_path, null_path, null_path, null_path).parse_args([])

pyproject.toml

Lines changed: 71 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
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'
195199
testpaths = ['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"]
219223
line-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.
227231
select = [
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

269273
ignore = [
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']
285289
unfixable = []
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]
291295
allow-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.
298302
max-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.
307311
ignore-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"
317321
exclude = []
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.
326330
skip-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']

webchanges/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# * MINOR version when you add functionality in a backwards compatible manner, and
2323
# * MICRO or PATCH version when you make backwards compatible bug fixes. We no longer use '0'
2424
# If unsure on increments, use pkg_resources.parse_version to parse
25-
__version__ = '3.33.0rc0'
25+
__version__ = '3.33.0'
2626
__description__ = (
2727
'Check web (or command output) for changes since last run and notify.\n\nAnonymously alerts you of web changes.'
2828
)

webchanges/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def __init__(
8080
) -> None:
8181
"""Command line arguments configuration; the arguments are stored as class attributes.
8282
83+
:param args: The args from the command line.
8384
:param config_path: The path of the configuration directory.
8485
:param config_file: The path of the configuration file.
8586
:param jobs_def_file: The glob of the jobs file(s).
@@ -366,8 +367,6 @@ def parse_args(self, cmdline_args: list[str]) -> argparse.ArgumentParser:
366367
metavar='JOB',
367368
)
368369

369-
# # workaround for avoiding triggering error when invoked by pytest
370-
# if parser.prog != '_jb_pytest_runner.py' and not os.getenv('CI'):
371370
args = parser.parse_args(cmdline_args)
372371

373372
for arg in vars(args):

0 commit comments

Comments
 (0)