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

Mutable default arguments in Python code #3005

Open
artshipulin opened this issue Apr 2, 2024 · 1 comment
Open

Mutable default arguments in Python code #3005

artshipulin opened this issue Apr 2, 2024 · 1 comment

Comments

@artshipulin
Copy link

def CopyTool(flavor, out_path, generator_flags={}):
is wrong because https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments

@cclauss
Copy link
Contributor

cclauss commented Apr 2, 2024

Pull requests are gladly reviewed on the repo https://github.com/nodejs/gyp-next

Please look to see if there are any others by running ruff check --select=B006

Also, try ruff rule B006

https://docs.astral.sh/ruff/rules/mutable-argument-default

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

No branches or pull requests

2 participants