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

Hints/stubs should be explicit about returning None

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.15
    • Fix Version/s: 5.15.1
    • Component/s: PySide
    • Labels:
      None
    • Commits:
      92a6f4b71770e0a6e63c8210992ba81448657373 (pyside/pyside-setup/dev)

      Description

      With disallow_untyped_calls = True set for mypy I get various reports about untyped methods. For example, QWidget.show().

      qtrio/examples/emissions.py:98: error: Call to untyped function "show" in typed context
      

      Which is stubbed as follows.

      def show(self): ...
      

      It would be nice if these were explicitly hinted as returning None.

      def show(self) -> None: ...
      

        Attachments

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

          Activity

            People

            Assignee:
            ctismer Christian Tismer
            Reporter:
            altendky Kyle Altendorf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes