plotly / plotly/plotly.py

Request: add type hints and `py.typed` for type checkers and tab complete

Open
#4,927 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2 size: 3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

With plotly==5.24.1, running mypy==1.13.0 on a module importing plotly:

error: Cannot find implementation or library stub for module named "plotly.express" [import-not-found]
    import plotly.express as px
    ^

The request is can plotly add type hints, and a py.typed so type checkers can use them?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the mypy 1.13.0 error with plotly 5.24.1 and the import plotly.express as px entry point. Inspect how the package exposes type information and determine the scope of hints needed for type checkers and tab completion. Done means mypy can resolve the import and the package includes py.typed support.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.