Commit graph

3 commits

Author SHA1 Message Date
5d1ba6e15a
pyproject.toml: Enforce import annotations style

Add new ruff rules and fix their fallout:

future-annotations = true

select = [ "TC", # type-checking import placement rules "FA", # future annotations rules ]

This comprises:

- Streamline imports and exports in cmds.xxx.Cmd

- Import base class as "Base"
- Export types Cmd and Parent via __all__

- Move all types imported only for annotation below TYPE_CHECKING

- Use "from __future__ import annotations" all over the place

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-01 14:34:25 +02:00
7a65a7b5e1
pyproject.tompl: Set ruff.output-format = "concise"

In order to produce make check output digestable by vim, ruff's output format needs to be set to "concise", so do that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-01 14:33:52 +02:00
36d854ce19
py-topdir.mk: Use ruff and yapf
- Use ruff and yapf for the targets py-check-syntax, py-format and py-check-format.
- Add a pyproject.toml for those. It also includes configuration for isort, albeit not being directly used in the linter targets.

- Make .gitignore igore that in newly created projects.

- Add ruff, yapf and isort to pkg.requires.release, anticipating their use by CI.
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:36 +02:00