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

QComboBox.addItems type hints should accept Iterable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.10.0, 6.9.3
    • 6.9.1
    • Type hints
    • None
    • d563bfbd2 (dev), 4dd787272 (6.9), aecac559a (tqtc/6.9.2), 257fed9da (dev), 9476875e1 (6.9)

      The difference between Python Sequences and Iterables is that Sequences have a length while Iterables do not need to have a length.

      Type hints for QComboBox.addItems require a Sequence while at runtime, it works with Iterables, too, see attached code.

      The type hint could/should be modified to accept Iterable instead of only Sequence.

        1. bug.py
          0.4 kB
          bers bers
        For Gerrit Dashboard: PYSIDE-3140
        # Subject Branch Project Status CR V

            cinucen Ece Cinucen
            bers bers bers
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are 2 open Gerrit changes