Skip to content
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

fix: importing manim should not trigger pygments.styles.get_all_styles #3797

Merged

Conversation

goldenphoenix713
Copy link
Contributor

@goldenphoenix713 goldenphoenix713 commented Jun 7, 2024

Overview: What does this pull request change?

Removed the Code.styles_list attribute.

Added new class method Code.get_styles_list().

Rewrote the documentation to say that a list of all styles can be generated by calling a new class method.

The example in the docstring of Code was rewritten to use an explicit code style name.

Motivation and Explanation: Why and how do your changes improve the library?

See #3713 for issue.

Links to added or changed documentation pages

https://manimce--3797.org.readthedocs.build/en/3797/

Further Information and Comments

First contribution!

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

Removed the Code.styles_list attribute.

Rewrote the documentation to say that a list of all styles can be generated by calling list(pygments.styles.get_all_styles()).

The example in the docstring of Code was rewritten to use an explicit code style name.
@goldenphoenix713 goldenphoenix713 marked this pull request as ready for review June 7, 2024 04:25
@JasonGrace2282
Copy link
Member

Hey, I'll take a look at this within the next few days, as I'm a bit busy right now. Just wanted to let you know that we see this PR and intend to review it :)

Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look mostly good to me! Thanks for taking on this issue :)
I've left a few questions/comments (they're a little bit pedantic, so bear with me!) but after that I think this PR is good to go!
Thanks for helping make Manim better ✨

manim/mobject/text/code_mobject.py Show resolved Hide resolved
manim/mobject/text/code_mobject.py Outdated Show resolved Hide resolved
manim/mobject/text/code_mobject.py Outdated Show resolved Hide resolved
goldenphoenix713 and others added 2 commits June 11, 2024 00:43
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your work here!

@JasonGrace2282 JasonGrace2282 merged commit 3ed86a8 into ManimCommunity:main Jun 17, 2024
18 checks passed
@goldenphoenix713 goldenphoenix713 deleted the remove-code-styles_list branch June 20, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

importing manim should not trigger pygments.styles.get_all_styles
2 participants