XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.1
    • all
    • Type hints
    • None
    • All
    • 7632530b8 (dev), 05cbe936a (6.8)

    Description

      pyside has so many typing issues i.e Property 

      from PySide6.QtCore import QObject, Property
      
      class B(QObject):
          ...
      
      class A(QObject):
      
          @Property(QObject, constant=True)
          def foo(self) -> B:        ...
      
      reveal_type(A().foo) 

       

      mypypoc.py:9: error: "Property" not callable  [operator]
      mypypoc.py:10: error: Missing return statement  [empty-body]
      mypypoc.py:14: note: Revealed type is "Any" 

      also `Slot` should just return the function decorated

      from PySide6.QtCore import QObject, Slot
      class B(QObject):    ...
      class A(QObject):
      
          @Slot(int)    def foo(self) -> int:        ...
      
      reveal_type(A().foo) 
      mypypoc.py:10: error: Missing return statement  [empty-body]
      mypypoc.py:14: note: Revealed type is "Any" 

       

       

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              nir nir benlulu
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes