Include type hints in function parameters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Hi,
Static type checkers (mypy, pyright/pylance) are becoming increasingly popular in the python world.
For now they don't work with Dash as there are no type annotations included with the library.
From what I understand, python code for dash components as well as their docstrings are somehow transpiled from javascript? If so, adding type hints should be relatively straightforward as it appears that the docstrings already contain very detailed typing information. This would significantly improve QOL for users using type checkers (which includes the majority of the vscode userbase since vscode uses pylance by default).
For reference, plotly has also started adding typing information to their functions - see for instance https://github.com/plotly/plotly.py/pull/3425#issuecomment-1117210067 .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Dash component Python code and docstrings are transpiled from JavaScript, since the issue identifies that as the likely source of the typing information. Check the resulting interfaces with mypy and pyright/pylance; done means Dash functions expose usable type annotations to static type checkers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100