-
Notifications
You must be signed in to change notification settings - Fork 949
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
Type annotations #3688
Comments
Probably a dupe of #3676.
PRs welcome, of course! |
I'm unfamiliar with this code base, and I'm only using it for a project at work, so I probably can't justify spending the time to do it myself. That said, although this is technically a dupe I'd consider it orthogonal to the docstring styling which is the core of #3676. |
Now that mypy 1.0 is out I can pick up ipython/traitlets#818 Again, which is 90% of the typing in ipywidgets (the traits). This is what you want I guess? |
To the initial point of developers and IDEs: type hints and in-code help, as delivered from docstrings, are very tightly coupled for most IDE integrations (e.g. the language server protocol) and the jupyter messaging protocol (completion and inspection). While moving forward on type hints would put more squiggly red lines in the editor, standardizing what a user sees when hovering over these tokens substantially improves the overall experience, which also extends to the documentation. |
I think the remaining 10% involve some function type annotations and adding a |
Problem
Type annotations would allow developers and IDEs to easily reason about how ipywidgets is meant to be used.
Proposed Solution
Add type annotations to the point where all the Python code in this repo passes
mypy
inspection, and ideallymypy --strict
.Additional context
mypy --strict
compliance:The text was updated successfully, but these errors were encountered: