Skip to content

Fix dangerous default argument#31

Open
deepsource-runner[bot] wants to merge 2 commits into
masterfrom
deepsource-autofix-dc53564e
Open

Fix dangerous default argument#31
deepsource-runner[bot] wants to merge 2 commits into
masterfrom
deepsource-autofix-dc53564e

Conversation

@deepsource-runner
Copy link
Copy Markdown

Do not use a mutable like list or dictionary as a default value to an argument. Python’s default arguments are evaluated once when the function is defined. Using a mutable default argument and mutating it will mutate that object for all future calls to the function as well.

Do not use a mutable like `list` or `dictionary` as a default value to an argument. Python’s default arguments are evaluated once when the function is defined. Using a mutable default argument and mutating it will mutate that object for all future calls to the function as well.
This commit fixes the style issues introduced in f26366e according to the output
from Black and ISort.

Details:
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.

1 participant