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

pyside6-metaobjectdump fails on 3rd party decorator

XMLWordPrintable

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

      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`

        1. pyside2203.py
          0.2 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes