-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I'm running on Python3.9. I have the following code and RUFF spits out an error about RUF012. I think it may be related to #6267 and / or #12288 (since, I think, the future import makes all annotations strings?).
Ruff Version: 0.9.3
"""ClassVar example."""
from __future__ import annotations
import typing
class Example():
"""Class that uses ClassVar."""
options: ClassVar[dict[str, str]] = {}
if typing.TYPE_CHECKING:
from typing import ClassVarsample.py:11:41: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
|
9 | """Class that uses ClassVar."""
10 |
11 | options: ClassVar[dict[str, str]] = {}
| ^^ RUF012
|
Found 1 error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working