Sync the tree with current mypy and isort #4
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/fix/20261113-sync-the-tree-with-current-mypy-and-isort"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The toolchain moved on:
mypy2.4.0 flags theandcheck in__parse__()as unreachable, and the currentisortrewrites two import lists on everymake formatrun. The two commits keepmake checkandmake formatgreen without changing runtime behaviour:Options.init(): Annotate __allowed_keys as Any
mypy2.4.0 infers the attribute from theNoneassignment in__init__()and then flags the right operand of theandcheck in__parse__()as unreachable code, failingmake check.The attribute is only ever assigned None, so annotate it as Any and keep the runtime behaviour unchanged.
style: Sync import formatting with current isort
The current
isortformats parenthesized import lists with a trailing comma and wraps long imports differently than when the files were last formatted, somake formatrewrites them on every run even though nothing is wrong with the code.Apply
make formatto the two drifted import statements so the tree matches the formatter's output andmake formatbecomes a no-op:src/python/jw/util/log.py: trailing comma in thejw.pkg.lib.logimport listsrc/python/jwutils/db/schema/CompositeForeignKey.py: wrap theCompositeForeignKeyimport in parentheses