Skip to content

Fix dangerous default argument - #92

Open
deepsource-autofix[bot] wants to merge 1 commit into
masterfrom
deepsource-autofix-7c5fa6b5
Open

Fix dangerous default argument#92
deepsource-autofix[bot] wants to merge 1 commit into
masterfrom
deepsource-autofix-7c5fa6b5

Conversation

@deepsource-autofix

Copy link
Copy Markdown
Contributor

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.
@jai-deepsource

Copy link
Copy Markdown
Contributor

@deepsourcebot review

@deepsource-io

deepsource-io Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

DeepSource Code Review

We reviewed changes in 991ffe6...8c81a42 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Terraform Apr 11, 2026 1:19a.m. Review ↗
Swift Apr 11, 2026 1:19a.m. Review ↗
Test coverage Apr 11, 2026 1:19a.m. Review ↗
SQL Apr 11, 2026 1:19a.m. Review ↗
Shell Apr 11, 2026 1:19a.m. Review ↗
Secrets Apr 11, 2026 1:19a.m. Review ↗
Scala Apr 11, 2026 1:19a.m. Review ↗
Rust Apr 11, 2026 1:19a.m. Review ↗
Ruby Apr 11, 2026 1:19a.m. Review ↗
Python Apr 11, 2026 1:19a.m. Review ↗
PHP Apr 11, 2026 1:19a.m. Review ↗
Kotlin Apr 11, 2026 1:19a.m. Review ↗
Java Apr 11, 2026 1:19a.m. Review ↗
Docker Apr 11, 2026 1:19a.m. Review ↗
C & C++ Apr 11, 2026 1:19a.m. Review ↗
C# Apr 11, 2026 1:19a.m. Review ↗
Ansible Apr 11, 2026 1:19a.m. Review ↗
Go Apr 11, 2026 1:19a.m. Review ↗
JavaScript Apr 11, 2026 1:19a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

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