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

Type hints: QMessageBox.warning misses default values for button0, button1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.8.2
    • 6.8.1
    • Type hints
    • None
    • c660766e3 (dev), ec4485f53 (6.8)

    Description

      This code runs fine, yet mypy reports missing parameters:

      from PySide6.QtWidgets import QApplication, QMessageBox, QWidget
      
      QApplication()
      QMessageBox.warning(QWidget(), "", "")
      

      bug.py:4: error: Missing positional arguments "button0", "button1" in call to "warning" of "QMessageBox" [call-arg]
      bug.py:4: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info
      Found 1 error in 1 file (checked 1 source file)

      Attachments

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              bers bers bers
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes