Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Exclude code blocks that aren't run#5307

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvwilson merged 2 commits intomkdocs-conversionfromupdate-script
Jul 31, 2025
Merged

Conversation

@LiamConnors
Copy link
Member

In the docs we have Python code which is formatted as Python code

image

but not run. In the Markdown it looks like this, it's inside blocks:

<!-- #region -->Code that relied on the `add_*` methods to return a reference to the newly created trace will need to be updated to access the trace from the returned figure.  This can be done by appending `.data[-1]` to the add trace expression.Here is an example of a version 3 code snippet that adds a scatter trace to a figure, assigns the result to a variable named `scatter`, and then modifies the marker size of the scatter trace.```pythonimport plotly.graph_objs as gofig = go.Figure()scatter = fig.add_trace(go.Scatter(y=[2, 3, 1]))scatter.marker.size = 20

In version 4, this would be replaced with the following:

importplotly.graph_objectsasgofig=go.Figure()scatter=fig.add_trace(go.Scatter(y=[2,3,1])).data[-1]scatter.marker.size=20
This PR modifies the `run_markdown.py` script to not run these sections. Also updates the test script to use the same function as `run_markdown.py` uses

@gvwilsongvwilson merged commite45f54c intomkdocs-conversionJul 31, 2025
4 of 7 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gvwilsongvwilsonAwaiting requested review from gvwilson

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@LiamConnors@gvwilson

[8]ページ先頭

©2009-2025 Movatter.jp