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

Pyright: 'Object of type "overload" is not callable' for Q... constructors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need More Info
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.15.1
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
    • Environment:
      VS Code with Python Extension 2020.10.332292344 and Pyright 1.1.82, WPy64-3830
    • Platform/s:
      Windows

      Description

      Pyright flags the right hand side of the third line here as Object of type "overload" is not callable:

      import sys
      import PySide2.QtWidgets as widgets
      app = widgets.QApplication(sys.argv)

      The same applies to constructors and other methods of many more classes.

      Note added after more research: Pyright seems to get confused by the try: import typing at the beginning of each of PySide's .pyi files.

        Attachments

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

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            jlovi Jörn Loviscach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes