Skip to content

PySide6 does not offer sufficient Mypy hints #320

@apyrgio

Description

@apyrgio

PySide6 has the same issues as PySide2 with regards to Mypy; they both lack the necessary type hints, and Mypy complains loudly.

dangerzone/gui/logic.py:43: error: "Type[QFontDatabase]" has no attribute "FixedFont"  [attr-defined]
dangerzone/gui/logic.py:136: error: "Type[Qt]" has no attribute "CustomizeWindowHint"  [attr-defined]
dangerzone/gui/logic.py:137: error: "Type[Qt]" has no attribute "WindowTitleHint"  [attr-defined]
dangerzone/gui/logic.py:138: error: "Type[Qt]" has no attribute "WindowSystemMenuHint"  [attr-defined]
dangerzone/gui/logic.py:139: error: "Type[Qt]" has no attribute "WindowCloseButtonHint"  [attr-defined]
dangerzone/gui/logic.py:140: error: "Type[Qt]" has no attribute "WindowStaysOnTopHint"  [attr-defined]

For PySide2, we have sidestepped this issue by installing a separate project as a dev (lint) dependency: PySide2-stubs. For PySide6 though, there are currently no separate stubs, and it's still an open issue in their tracker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions