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
For Gerrit Dashboard: PYSIDE-2685 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
555365,4 | Fix missing NoneType import, amended | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
556314,2 | Fix missing NoneType import, amended | 6.7 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
556429,2 | Fix missing NoneType import, amended | tqtc/lts-6.5 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |