Commit graph

345 commits

Author SHA1 Message Date
c339719936
Annotate the ORM columns with orm.Mapped
Since SQLAlchemy 2.0, `orm.mapped_column()` with an annotation
lets `mypy` see `pixel.id` as an `int` instead of a `Column[int]`.
2026-11-30 11:22:04 +01:00
a8b4bca79d
Merge branch 'fix-sawarnings' into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m44s
Reviewed-on: #7
2026-11-30 11:05:11 +01:00
c3198ecc48
Turn all warnings into errors
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m43s
New warnings, such as deprecations,
then fail right away instead of piling up.

The ignore for `patsy` is obsolete.
2026-11-30 10:56:56 +01:00
e01421bb96
Close the connection after running the migrations
The pooled `connection` stayed open until garbage collection,
which emits a `ResourceWarning`
2026-11-30 10:54:36 +01:00
ee5a372b2b
Link new objects from the parent
Since SQLAlchemy 2.0, only the parent's end
cascades a new object into the session'
2026-11-30 10:40:27 +01:00
87aaebe475
Join the session into the outer transaction
With "create_savepoint", commits inside a test case
only release a savepoint, so the final rollback no longer warns
2026-11-30 10:24:10 +01:00
fb87326d66
Merge branch 'add-ruff' into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m43s
Reviewed-on: #6
2026-11-28 05:01:26 +01:00
a24db98262
Enable PLR in ruff
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m43s
2026-11-28 04:57:25 +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
175d722071
Merge branch 'remove-wps' into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m41s
Reviewed-on: #5
2026-11-28 04:16:01 +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
1a4dfb0ee7
Sort the plugins in the "select" list 2026-11-28 04:09:52 +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
afe8b3ce90
Apply shared fixtures to whole test classes 2026-11-28 03:52:11 +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
137b3b1e03
Remove the config of flake8-expression-complexity 2026-11-28 03:26:10 +01:00
b24eb80f70
Remove the config of flake8-string-format 2026-11-28 03:26:10 +01:00
13eedbf699
Remove the config of flake8-rst-docstrings 2026-11-28 03:26:10 +01:00
21d6066086
Remove the config of flake8-isort 2026-11-28 03:26:09 +01:00
785bb99c7d
Remove the config of flake8-eradicate 2026-11-28 03:26:04 +01:00
9fcb3c8c14
Remove all "WPS" codes 2026-11-28 03:25:20 +01:00
8a5a652b3e
Run the local nox hooks serially 2026-11-28 02:00:30 +01:00
7c528d327e
Merge branch 'merge-message-template' into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
Reviewed-on: #4
2026-11-28 01:40:15 +01:00
253a12821e
Name merge commits after the merged branch
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
2026-11-28 01:33:40 +01:00
0dc32da8c1
Merge pull request 'ci-no-merges-in-branches' (#3) from ci-no-merges-in-branches into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m39s
Reviewed-on: #3
2026-11-28 01:28:33 +01:00
30aac8e3c7
Use FORGEJO_... names in CI
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
2026-11-28 01:26:18 +01:00
d158577984
Reject merge commits in feature branches 2026-11-28 01:24:44 +01:00
9e10a0c9aa
Merge pull request 'Run CI only on pushes' (#2) from ci-push-only into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
Reviewed-on: #2
2026-11-28 01:15:37 +01:00
4fb96ee485
Run CI only on pushes
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
2026-11-28 01:05:28 +01:00
c6ea7b13ec
Merge pull request 'Use language: unsupported for the local hooks' (#1) from use-language-unsupported into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m44s
Reviewed-on: #1
2026-11-28 01:01:41 +01:00
8265790d5d
Use language: unsupported for the local hooks
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m40s
CI / Checks (Python 3.13) (pull_request) Successful in 1m41s
2026-11-28 00:57:42 +01:00
5c3a942ad5
Merge branch 'rework-pre-commit' into develop
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m41s
2026-11-27 16:13:53 +01:00
2f0748e059
Rename ci.yml to ci.yaml
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m41s
2026-11-27 16:11:46 +01:00
d8edd58fe6
Reformat the pre-commit config
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m41s
Also, drop the no longer needed stage overrides
2026-11-27 16:05:19 +01:00