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

pylance compatibility: have static modules rather than dynamic ones

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.2.13, 6.8.0, 6.7.3
    • 6.7.2
    • Type hints
    • None
    • adf240747 (dev), c443b9f9c (6.7), cc6d4d37b (tqtc/lts-6.5), d6fc39116 (tqtc/lts-6.2)

    Description

      From https://github.com/microsoft/pylance-release/issues/1008#issuecomment-876036121

      The Pyside6 __init__.py file defines __all__ in a dynamic manner, so static type checkers will not work with it. If this library is important to you, please work with the library maintainer to define __all__ in a way that conforms to this guidance, which we established by working with other Python type checkers and language servers.
      
      __all__ = list("Qt" + body for body in "Core;Gui;Widgets;...".split(";"))
      
      should be changed to
      
      __all__ = ["QtCore", "QtGui", "QtWidgets", ...]
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews