Skip to content

mypy error about ElementTree[Element[str] | None] #221

@nojhan

Description

@nojhan

After having applied PR #220 and PR #218, poetry run make returns the following (very strange) error from mypy:

$ poetry run make
ruff format kalamine
16 files left unchanged
ruff check --fix kalamine
All checks passed!
ruff format --check kalamine
16 files already formatted
ruff check kalamine
All checks passed!
mypy kalamine
pyproject.toml: [mypy]: Unrecognized option: module = ['progress.bar']
kalamine/xkb_manager.py:389: error: Argument 1 to "get_rules_variant_list" has incompatible type "ElementTree[Element[str]]"; expected "ElementTree[Element[str] | None]"  [arg-type]
kalamine/server.py:196: error: Argument 1 to "tostring" has incompatible type "Element[str] | None"; expected "Element[str]"  [arg-type]
Found 2 errors in 2 files (checked 16 source files)
make: *** [lint] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions