Sync the tree with current mypy and isort #4

Merged
Jan Lindemann merged 2 commits from jan/fix/20261113-sync-the-tree-with-current-mypy-and-isort into master 2026-11-13 15:20:34 +01:00 AGit

2026-11-13

style: Sync import formatting with current isort
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m26s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m27s
CI / Packaging test (pull_request) Successful in 0s
The current isort formats parenthesized import lists with a trailing comma
and wraps long imports differently than when the files were last formatted,
so make format rewrites them on every run even though nothing is wrong with
the code.

Apply make format to the two drifted import statements so the tree matches
the formatter's output and make format becomes a no-op:

- src/python/jw/util/log.py: trailing comma in the jw.pkg.lib.log import
  list
- src/python/jwutils/db/schema/CompositeForeignKey.py: wrap the
  CompositeForeignKey import in parentheses

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.2
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-11-13 15:09:33 +01:00
Options.__init__(): Annotate __allowed_keys as Any
mypy 2.4.0 infers the attribute from the None assignment in __init__() and
then flags the right operand of the and check in __parse__() as unreachable
code, failing make check.

The attribute is only ever assigned None, so annotate it as Any and keep
the runtime behaviour unchanged.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.2
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-11-13 15:09:33 +01:00