---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
snapshot_kind: text
---
UP006_1.py:9:10: UP006 [*] Use `collections.defaultdict` instead of `typing.DefaultDict` for type annotation
   |
 9 | def f(x: typing.DefaultDict[str, str]) -> None:
   |          ^^^^^^^^^^^^^^^^^^ UP006
10 |     ...
   |
   = help: Replace with `collections.defaultdict`

ℹ Safe fix
6  6  |     from collections import defaultdict
7  7  | 
8  8  | 
9     |-def f(x: typing.DefaultDict[str, str]) -> None:
   9  |+def f(x: defaultdict[str, str]) -> None:
10 10 |     ...
