Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1520

Type Checking using mypy errors erroneously

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need More Info
    • Priority: P2: Important
    • Resolution: Incomplete
    • Affects Version/s: 6.0.1, 6.0.2
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None

      Description

      The type signatures defined in the `.pyi` files are not as descriptive as they should be, causing mypy to error.

      For example, 

      error: Argument 1 to "setForeground" of "QTextFormat" has incompatible type "GlobalColor"; expected "QBrush"

      This shouldn't be an error - the code works perfectly fine.

      Run mypy on the attached file to see more examples.

       

      For error: "Slot" is not callable" see https://github.com/python/mypy/issues/10209

        Attachments

        For Gerrit Dashboard: PYSIDE-1520
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            ctismer Christian Tismer
            Reporter:
            umbralreaper UmbralReaper N/A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes