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

Wrong type hint for QModelIndex.internalPointer

    XMLWordPrintable

Details

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

    Description

      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: ...

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes