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

Incomplete pyi file for PySide2.QtCore

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.13.2
    • PySide
    • None
    • Linux/X11

    Description

      Hello! 

      Thank you for creating the awesome pyi files, making it easier for IDEs to show autocompletion options. 

      I am using PyCharm - one of the popular Python IDEs out there. It references the pyi files from the PySide2 package when installed into a virtual environment. Now, when I use the autocompletion feature, it perfectly shows everything based on pyi files available. However, it also shows errors in some cases, like imports.

      from PySide2.QtWidgets import QMainWindow, QApplication, QAction

      from PySide2.QtCore import Slot, qApp

      PyCharm will report that everything is perfectly normal with the first line of import but will show an error that it can not find the reference to Slot (and qAPP) in QtCore.pyi file. Opening the QtCore.pyi file manually confirms that. The only cases where slot is found are:

      • a function called SLOT
      • function arguments

      I uploaded the QtCore.pyi file as attachment here. 

      I should mention that running the above statements in file/python interpreter works fine, so the modules are actually there. Just not found in pyi file. 

       

      Again, thank you for the Awesome pyi files Cristian (and your team) 

      Attachments

        1. QtCore.pyi
          244 kB
          Amit Ami

        Issue Links

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              lordamit Amit Ami
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: