-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[🐛 Bug]: [py] Many type annotation errors need fixing #15697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue is looking for contributors. Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested. |
Hello, can I work on this ? |
@MohabASHRAF-byte yes, go ahead. We appreciate contributions from your side. |
@navin772 Is there a communication channel other than GitHub? |
@MohabASHRAF-byte Yes, we use slack, you can join here - https://inviter.co/seleniumhq |
@MohabASHRAF-byte thanks! Not only are there many Mypy errors, but many of the type annotations are using outdated classes and syntax. An easy way to update them is by using this: https://github.com/asottile/pyupgrade Run it across the whole codebase using Python 3.9 syntax. Ping me here or on Slack if you have any questions. |
ok, thank you, I will consider it, and I sent a request to join Slack. |
Description
TLDR: Our use of type hints in the Python bindings needs some serious love.
Static typing is optional in Python, and we make use of it in many places throughout the Python bindings code. Static typing is not enforced at runtime, but can be checked with tooling like Mypy.
We currently have a Mypy environment and set of type checking rules declared in our
tox.ini
configuration. You can run Mypy locally with:Running this produces a screen full of type errors and:
We currently run Mypy in a CI workflow, but we don't display the errors or fail the job when it hits errors, so they just go unnoticed.
To resolve this issue, we should:
Reproducible Code
Debugging Logs
The text was updated successfully, but these errors were encountered: