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

NoneType is an Unknown import

    XMLWordPrintable

Details

    • 15b964d00 (dev), 165232a09 (6.5), 1ae272c38 (dev), f32c87d71 (6.7), 2d18d70ea (tqtc/lts-6.5)

    Description

      `types.NoneType` is an unknown import in Python 3.9 and below.

      There's a few ways to handle this while keeping Python 3.9 support:
      1. Use `_typeshed.NoneType`. typeshed is bundled with type checkers (mypy, pyright, pytype, pycharm) and so should be available. This overload is also marked as stable.
      2. Implement your own overload like typeshed does: https://github.com/python/typeshed/blob/1c0500a57050815102c702efd053e09770a5ee88/stdlib/_typeshed/__init__.pyi#L270-L277
      3. Use `type[None]` instead.

       

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              avasam Samuel Therrien
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes