Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake 'typing' package Python 2 compatible #160
Comments
|
Mypy has a somewhat functional Python 2 port of |
The current
typingmodule doesn't support Python 2 as well as the third-partybackports.typingmodule. It's a good idea to have the source code of thetypingmodule installed on your system when you type check Python 2 code, e.g. against Python stub files with types. It will simplify things for a static type checker.I guess we could create a backported version of
typing. I mean something similar to 3.5.0b1 with all the recent API changes. The 2/3 single source approach won't work here because the module heavily relies on metaclasses and uses type hints in many places.I will start working on a backport in a separate branch.