manim icon indicating copy to clipboard operation
manim copied to clipboard

Use `config.` instead of `config["..."]` to preserve type

Open GniLudio opened this issue 2 months ago • 10 comments

Description of proposed feature

Currently, the config is often accessed via

config["some_attribute"]

I think it would be better to replace all of these with

config.some_attribute

as that preserves the attribute type and prevents typos.

It is probably a good idea to spread this over multiple PRs.

GniLudio avatar Sep 25 '26 14:09 GniLudio

I'd like to take this one. PR is up: #5033 (covers the manim/ package; happy to follow up on tests/docs separately).

Aayushsuthar avatar Sep 25 '26 15:09 Aayushsuthar

Hi! I'm new to contributing and I'd like to take this one. I have looked at manim/utils/ and the config access patterns there. I will open a small PR covering just manim/utils/ first so it will stay easy to review. Dropping this note before I start.

Update: PR is up: #5055 (covers the manim/utils/)

KurodaniYamame avatar Oct 07 '26 06:10 KurodaniYamame

Hi! Since it was suggested to spread this over multiple PRs, and @KurodaniYamame is handling manim/utils/, I'd love to help out by taking on the manim/mobject/ directory. Let me know if that works!

shaffilsaini avatar Oct 07 '26 08:10 shaffilsaini

Hi! I'm interested in contributing to this issue as a first-time contributor.

I'd like to start with a small, focused change in one module, replacing suitable dictionary-style configuration access with attribute-style access.

Could you suggest a good module to start with? I'll follow the contribution guidelines and test the changes before opening a PR.

Thank you!

se1vapriya avatar Oct 08 '26 02:10 se1vapriya

Hi! I’m a student preparing a small first contribution to Manim.

I noticed that manim/utils/ already has an open PR and that another contributor has expressed interest in manim/mobject/.

Would it be okay for me to work only on the remaining suitable config["..."] accesses under manim/animation/?

I plan to keep the PR small, verify that each occurrence refers to the global ManimConfig, and run the relevant tests, Ruff, and pre-commit checks before submitting.

I will make sure that I understand and verify every change myself. Thanks!

Rice-one avatar Oct 08 '26 04:10 Rice-one

Looks like the language models learned a new trick.

nikolajmunk avatar Oct 08 '26 06:10 nikolajmunk

Hi! I'd like to work on this issue as part of a university course. Unless someone is already on it, I'll open a PR soon. Thanks!

Tarankalsi avatar Oct 18 '26 11:10 Tarankalsi

Hi! @shaffilsaini, are you still working on manim/mobject/? If not, I’d like to take just manim/mobject/text/ (tex_mobject.py, text_mobject.py). I’ll leave numbers.py and code_mobject.py alone, since their config is a local dict, not the global ManimConfig.

Rohith-Kaki avatar Nov 11 '26 05:11 Rohith-Kaki