🚀 Feature Proposal
Type hints in Python are specified by PEP 484 and are of a great help when developing, thus proposing to add them to Python codebase. Would this be an option if I volunteer to (gradually) add them, assuming the types are validated in the CI by a checker tool like mypy so the types are validated on each pull request?
I have noticed rudimentary type hints already exist here and there, for example
indicates that WebDriver().name is a string. This offers better code completions in IDEs.
I have searched for similar issues, but it seems like this wasn't discussed yet (at least not on Github). As far as I can see, the only issue mentioning type hints is #1917; however, type stubs were removed since then.
Another alternative would be maintaining a third-party stub package (as specified in PEP 561). However, I don't want to start a third-party package if you are willing to keep the type hints along with the code (which is a much better option), or planning to add them already.
Motivation
Better code completion in IDEs is surely something the end users will appreciate. Another advantage is that type hints often intercept bugs, thus making the code more robust.
🚀 Feature Proposal
Type hints in Python are specified by PEP 484 and are of a great help when developing, thus proposing to add them to Python codebase. Would this be an option if I volunteer to (gradually) add them, assuming the types are validated in the CI by a checker tool like
mypyso the types are validated on each pull request?I have noticed rudimentary type hints already exist here and there, for example
selenium/py/selenium/webdriver/remote/webdriver.py
Line 263 in e9c738d
indicates that
WebDriver().nameis a string. This offers better code completions in IDEs.I have searched for similar issues, but it seems like this wasn't discussed yet (at least not on Github). As far as I can see, the only issue mentioning type hints is #1917; however, type stubs were removed since then.
Another alternative would be maintaining a third-party stub package (as specified in PEP 561). However, I don't want to start a third-party package if you are willing to keep the type hints along with the code (which is a much better option), or planning to add them already.
Motivation
Better code completion in IDEs is surely something the end users will appreciate. Another advantage is that type hints often intercept bugs, thus making the code more robust.