IceSpringPySideStubs
IceSpringPySideStubs copied to clipboard
BUG: Use of `NoneType` in Python 3.0 to 3.9 Creates Errors
NoneType was removed from types in python versions 3.0 to 3.9, but placed back in version 3.10 for type checking.
In versions < 3.10, using NoneType implicitly in the IceSpring stubs causes pylance to report a "partially unknown" error on functions that use it because mypy registers this as an Unknown type.
The solution is to use
NoneType = type(None)
throughout as that is, quite literally, what the value of NoneType is defined to be.
Thank you for the great package!
FYI: See also this SO post