Closed
Description
$ cat foo.py
from contextvars import ContextVar
foo = ContextVar('foo', default=frozenset[str]())
$ ruff check --select B039 foo.py
foo.py:3:33: B039 Do not use mutable data structures for `ContextVar` defaults
|
1 | from contextvars import ContextVar
2 |
3 | foo = ContextVar('foo', default=frozenset[str]())
| ^^^^^^^^^^^^^^^^ B039
|
= help: Replace with `None`; initialize with `.set()``
Found 1 error.
$ ruff --version
ruff 0.8.0