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

pyside6-metaobjectdump fails on 3rd party decorator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.5.0, 6.4.3
    • 6.4.2
    • PySide, Tooling
    • None
    • 0ada8b37d (dev), c490a22ab (6.4)

    Description

      We are using Pint in our code and we have something like this:

      class MyClass:
          @ureg.check(None, '[electric_potential]')
          def set_voltage(self, voltage) -> None:
              # Imagine an implementation
      

      `pyside6-metaobjectdump` will fail with this error:

        File ".../PySide6/scripts/metaobjectdump.py", line 272, in _parse_function_decorator
          name = node.func.id
      AttributeError: 'Attribute' object has no attribute 'id'
      

      But it doesn't fail on other decorators like `property` or `lru_cache`

      Attachments

        Activity

          People

            kleint Friedemann Kleint
            roussinm Maxime Roussin-BĂ©langer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: