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

snake_case feature causes staticmethod decorated methods to disappear from QObject types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.2.0
    • PySide
    • None
    • 42695262f0 (pyside/pyside-setup/dev) 18a93ae18a (pyside/pyside-setup/6.2) 18a93ae18a (pyside/tqtc-pyside-setup/6.2) 42695262f0 (pyside/tqtc-pyside-setup/dev) 42695262f0 (pyside/tqtc-pyside-setup/tqtc/dev) 18a93ae18a (pyside/pyside-setup/6.2.4)

    Description

      Consider

      class Foo(QObject):
          @staticmethod
          def bar():
      

      with snake_case:

      {'__module__': '__main__', '__doc__': None, 
      'staticMetaObject': <PySide6.QtCore.QMetaObject object at 0x7fcfad89b540>}
      

      without snake_case:

      {'__module__': '__main__', 'bar': <staticmethod object at 0x7fbb3640c520>, '__doc__': None, 
      'staticMetaObject': <PySide6.QtCore.QMetaObject object at 0x7fbb1bd73040>}
      

      Attachments

        1. pyside_snakecase_staticmethod.py
          0.1 kB
          Michal Laboš
        2. pyside1702.py
          0.5 kB
          Friedemann Kleint
        For Gerrit Dashboard: PYSIDE-1702
        # Subject Branch Project Status CR V

        Activity

          People

            ctismer Christian Tismer
            numerlor Michal Laboš
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes