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

Wrong type hint for QModelIndex.internalPointer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4: Low P4: Low
    • 6.7.2, 6.8.0
    • 6.7, 6.6.2
    • Type hints
    • None
    • All
    • 9c9448277 (dev), ddd875326 (6.7)

      QModelIndex.internalPointer is annotated to return an int. In fact, it returns whatever is passed in QAbstractItemModel.createIndex.

      So this is wrong:

      def internalPointer(self) -> int: ...

      And it should be:

      def internalPointer(self) -> Any: ...

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

            kleint Friedemann Kleint
            tilmankrummeck Tilman Krummeck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes