Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.7.0
-
None
-
1ae272c38 (dev), f32c87d71 (6.7), 2d18d70ea (tqtc/lts-6.5)
Description
The stub files use a call to type to get the NoneType.
NoneType = type(None) # incorrect
This is not allowed in type expressions. The correct way should be as follows:
type NoneType = type[None] # since Python 3.12 NoneType: TypeAlias = type[None] # pre Python 3.12
I came across this error in QtCore.pyi and QtWidgets.pyi but it probably affects other stub files too.
sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py:285
Attachments
Issue Links
- relates to
-
PYSIDE-2284 NoneType is an Unknown import
- Closed