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

Replaced mutable argument default by None #6541

Merged
merged 1 commit into from Dec 19, 2023

Conversation

sisp
Copy link
Contributor

@sisp sisp commented Dec 19, 2023

I've fixed the use of a mutable argument default (here, a dict literal), which can introduce bugs that are a bit hard to debug. Here, it doesn't seem to be a problem because self.attrs isn't mutated, but it's generally discouraged to use mutable argument defaults. See https://docs.astral.sh/ruff/rules/mutable-argument-default/#mutable-argument-default-b006 for more details.

@squidfunk squidfunk merged commit 9956bf1 into squidfunk:master Dec 19, 2023
4 checks passed
@squidfunk
Copy link
Owner

Thanks! Next time, please build the theme and also make sure that your changes are reflected in the material folder. For the plugins, it's mandatory to build the theme as well 😉

@squidfunk
Copy link
Owner

FWIF, I'm referring to 175df61.

@sisp sisp deleted the fix/mutable-argument-default branch December 19, 2023 09:07
@sisp
Copy link
Contributor Author

sisp commented Dec 19, 2023

Oh, I wasn't aware that changes to the plugins also need a fresh build. 🫣 I'll try to remember it. 😇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants