Skip to content

Add static types to figure's API#14289

Merged
mattpap merged 1 commit into
branch-3.7from
mattpap/14288_figure_types
Feb 6, 2025
Merged

Add static types to figure's API#14289
mattpap merged 1 commit into
branch-3.7from
mattpap/14288_figure_types

Conversation

@mattpap
Copy link
Copy Markdown
Contributor

@mattpap mattpap commented Feb 6, 2025

fixes #14288

@mattpap mattpap added this to the 3.7 milestone Feb 6, 2025
@mattpap
Copy link
Copy Markdown
Contributor Author

mattpap commented Feb 6, 2025

Let's call this good enough for now. Better typing will require PR #14254.

@mattpap mattpap merged commit d498e70 into branch-3.7 Feb 6, 2025
@mattpap mattpap deleted the mattpap/14288_figure_types branch February 6, 2025 18:42
@kernc
Copy link
Copy Markdown
Contributor

kernc commented Feb 16, 2025

This triggers mypy==1.15.0 with:

venv/lib/python3.11/site-packages/bokeh/plotting/_figure.pyi:65: error: invalid syntax  [syntax]

with the 3.7dev0 prerelease.

type EagerDataFrame = IntoDataFrame
type EagerSeries = IntoSeries

@mattpap
Copy link
Copy Markdown
Contributor Author

mattpap commented Feb 16, 2025

You will have to run mypy using Python 3.12+ or use mypy --python-version 3.12. You can start a new issue if this doesn't work for you or you want to discuss this further.

kernc added a commit to kernc/backtesting.py that referenced this pull request Feb 16, 2025
kernc added a commit to kernc/backtesting.py that referenced this pull request Feb 16, 2025
kernc added a commit to kernc/backtesting.py that referenced this pull request Feb 16, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for static typing to figure()

3 participants