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

Stubs don't include __init__ for QtCore.QEvent.Type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.4
    • 5.15.0
    • PySide
    • None
    • Linux, Python3.8, 0.782
    • e6a4a094ace43250e3ffca03a9f8d1f138de1b5a (pyside/pyside-setup/dev) d1d2c2385a12a7528ed9a966546aa229a962ab3b (pyside/tqtc-pyside-setup/tqtc/lts-5.15) 9819a81a96ce7b504144cfda94c8b70c3ab1671e (pyside/pyside-setup/6.0)

    Description

      When running mypy I am getting:

      qtrio/_core.py:34: error: Too many arguments for "Type"

      for:

      REENTER_EVENT: QtCore.QEvent.Type = QtCore.QEvent.Type(REENTER_EVENT_HINT)

      The code works with both PyQt5 and PySide2. PyQt5 also passes mypy for this using PyQt5-stubs anyways. help(QtCore.QEvent.Type) gives class Type(builtins.int) for PyQt5 and class Type(builtins.object) for PySide2. I get the same for QtCore.QJsonValue.Type so I guess it might be a generic shiboken.EnumType issue or such.

      Attachments

        1. QtCore_new.pyi
          599 kB
        2. QtCore_old.pyi
          600 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ctismer Christian Tismer
            altendky Kyle Altendorf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes