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

Type Checking using mypy errors erroneously

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0.1, 6.0.2, 6.1.1
    • PySide
    • None
    • e1909dfdd4dcc0742600d04afcfb3017ae471a31 (pyside/pyside-setup/dev) 6a2e912deadc4b1ddbc18ba390822bcdb1724041 (pyside/pyside-setup/6.2)

    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

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: