---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B006 [*] Do not use mutable data structures for argument defaults
 --> B006_7.py:4:22
  |
2 | # Same as B006_3.py, but import instead of docstring
3 |
4 | def foobar(foor, bar={}):    
  |                      ^^
5 |     import os
  |
help: Replace with `None`; initialize within function
  |
3 |
  - def foobar(foor, bar={}):    
  -     import os
4 + def foobar(foor, bar=None):    
5 +     import os
6 +     if bar is None:
7 +         bar = {}
  |
note: This is an unsafe fix and may change runtime behavior
