-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't working
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working