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

Address "Do not use mutable data structures for argument defaults" warning #322

Closed
palewire opened this issue Jan 19, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@palewire
Copy link
Contributor

flake8-bugbear in #318 is raising the following warnings. We should address them.

```bash
./warn/platforms/job_center/cache.py:27:40: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
./warn/platforms/job_center/site.py:101:37: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
./warn/platforms/job_center/site.py:121:27: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
./warn/platforms/job_center/site.py:227:58: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
./warn/scrapers/fl.py:188:34: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
@palewire palewire added the bug Something isn't working label Jan 19, 2022
@palewire palewire added this to the Tilling the soil milestone Jan 19, 2022
@palewire palewire self-assigned this Jan 19, 2022
@palewire palewire changed the title Addres "Do not use mutable data structures for argument defaults" warning Address "Do not use mutable data structures for argument defaults" warning Jan 19, 2022
@palewire palewire mentioned this issue Jan 19, 2022
@palewire
Copy link
Contributor Author

This was fixed by #323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant