Commit graph velofy/noxfile.py
Author SHA1 Message Date
3bd7dd5772
Enable RET in flake8 and ruff 2026-11-30 22:06:42 +01:00
007998372f
Enable SIM in flake8 and ruff 2026-11-30 22:06:41 +01:00
5dce8e6645
Enable UP in ruff 2026-11-30 21:28:31 +01:00
f0c617955b
Use the nox module import 2026-11-30 15:44:05 +01:00
9c3b52befb
Import typing as t ...
... and `collections.abc` as `cabc`

Linting rule for `velofy`: Import modules instead of objects
2026-11-30 15:42:21 +01:00
c6518f6b39
Use builtin generics and X | None
Since Python 3.9 and 3.10, `list`, `tuple`, and `X | None`
replace `typing.List`, `typing.Tuple`, and `typing.Optional`
2026-11-30 15:07:47 +01:00
570c9c9fcb
Run mypy in the "lint" session
It needs the dependencies of `velofy` installed,
and it now also reports "# type: ignore" comments without an error code
or that are not needed anymore
2026-11-30 13:15:27 +01:00
8f36a740d7
Enable ERA in ruff
Dead code belongs in the history, not in comments
2026-11-28 04:55:19 +01:00
707b4ab652
Add flynt to the "format" session
`flynt` converts old-style string formatting
into f-strings before `black` formats the result
2026-11-28 04:49:16 +01:00
e451f03d0f
Add ruff to the "format" session
`ruff format` adds parentheses around multi-line lambda bodies
and removes blank lines after block openers,
both of which `black` accepts.

Lines with `# type:ignore` are shortened
because `black` counts pragma comments toward the line length
and `ruff` does not.
2026-11-28 04:44:52 +01:00
318dff8fc8
Add ruff to the "lint" session
`ruff` runs alongside `flake8` and `isort`,
with the rules aligned to theirs:
- `noqa` comments go where both tools expect them
- `import`s stay sorted case-insensitively,
  now stated explicitly in both tools
- `print()` in the "docs" session became `session.log()`
2026-11-28 04:37:25 +01:00
88554e3939
Silence the module name notice of bandit
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m41s
2026-11-28 04:11:56 +01:00
4a81403f15
Replace darglint with pydoclint 2026-11-28 04:06:53 +01:00
3ec7ec8c98
Add pep8-naming 2026-11-28 03:54:49 +01:00
882d3c98ba
Add flake8-unused-arguments
- Request fixtures only needed for their side effects
  via `@pytest.mark.usefixtures()` instead of as arguments
- Remove fixtures that a test does not use at all
- Exempt abstract methods because their arguments define an interface
2026-11-28 03:48:50 +01:00
29a711f049
Add flake8-todos 2026-11-28 03:37:25 +01:00
cb8f919b1f
Add flake8-sfs 2026-11-28 03:34:40 +01:00
650765a9d3
Add flake8-quotes 2026-11-28 03:28:50 +01:00
50a0e45309
Ignore the double quotes commit in git blame 2026-11-28 03:28:49 +01:00
ea8f1a13e3
Use double quotes 2026-11-28 03:26:13 +01:00
7b32ffc599
Add flake8-docstrings 2026-11-28 03:26:12 +01:00
efde4322bf
Add flake8-debugger 2026-11-28 03:26:12 +01:00
08493d1ea1
Add flake8-comprehensions 2026-11-28 03:26:12 +01:00
7f14c9c855
Add flake8-commas 2026-11-28 03:26:11 +01:00
cb110267f0
Add flake8-bugbear 2026-11-28 03:26:11 +01:00
d9d9464f44
Add flake8-broken-line 2026-11-28 03:26:11 +01:00
2000ceca54
Add flake8-bandit 2026-11-28 03:26:10 +01:00
9fcb3c8c14
Remove all "WPS" codes 2026-11-28 03:25:20 +01:00
08dd3b8218
Install all hook types with a plain pre-commit install 2026-11-27 14:59:25 +01:00
ad8d43815e
Reorder the nox sessions ...
All checks were successful
CI / Tests (Python 3.13) (push) Successful in 1m6s
... as listed in the module docstring
2026-11-27 12:58:57 +01:00
7c2e21130f
Streamline the names, docstrings, and comments 2026-11-27 12:58:56 +01:00
689c8a8f42
Rewrite the module docstring 2026-11-27 12:58:56 +01:00
32f6540ec3
Add "doctest" session ...
... to run `xdoctest` against the `velofy` package.

Also, install `xdoctest` with only its "colors" extra
as the notebooks do not contain doctests.
2026-11-27 12:58:52 +01:00
110c6f755b
Streamline the "test" session
Rely on pyproject.toml for the `coverage` options,
and shorten the comments.
2026-11-27 12:48:53 +01:00
e7d93a5496
Do not run mypy for now 2026-11-27 12:48:52 +01:00
50d5b885bf
Rename the nox session functions ...
... and add type hints
2026-11-27 12:48:52 +01:00
2147dbf9d0
Replace the "clean-pwd" session with "clean-cwd" 2026-11-27 12:48:52 +01:00
ded4691177
Remove the "fix-branch-references" session ...
... and use relative links in the docs from now on.

Forgejo resolves relative links against the branch being viewed.
So, rewriting absolute links per branch is no longer necessary.
2026-11-27 12:48:51 +01:00
5f73b74d69
Add a "deps-upgrade-check" session ...
... to report the latest version on PyPI and the age of
every release pinned in uv.lock, using a stdlib-only script.
2026-11-27 12:48:51 +01:00
ebad87b0a3
Add a "deps-lock" session ...
... to lock the dependencies
2026-11-27 12:48:51 +01:00
d918063218
Add a "deps-upgrade" session ...
... to upgrade the pinned dependencies
2026-11-27 12:48:50 +01:00
f5f24ea611
Add a "venv" session ...
... to set up the local develop environment
2026-11-27 12:48:50 +01:00
6d2578ef80
Replace "safety" with "deps-audit"
`safety check` is deprecated.

We use `pip-audit` instead, fed with the hashed dependencies
exported from uv.lock.

We ignore the known vulnerabilities in `black` v25 for now.
2026-11-27 12:48:42 +01:00
60aa7911d2
Remove the CI and pre-commit specific nox sessions 2026-11-27 12:39:14 +01:00
99db2dc623
Run only the "format", "lint", and "test" sessions by default 2026-11-27 12:39:14 +01:00
f5a0a91202
Keep temporary files in .cache/tmp 2026-11-27 12:39:10 +01:00
b5db5ab80e
Set the nox options reuse_venv and stop_on_first_error
Start with fresh virtual environments explicitly,
and stop at the first failing session.
2026-11-26 13:41:53 +01:00
911107af95
Clarify where pytest gets the "TESTING" variable from 2026-11-26 13:41:53 +01:00
218d1d6078
Skip installs in nox only with the "-R" flag
Use `skip_install()` and remove the guards against "-r"
that were only needed for `poetry install --no-dev`.
2026-11-26 13:41:52 +01:00
7ad2e4ee26
Replace _begin() with start() 2026-11-26 13:41:52 +01:00