---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:10:1
   |
 8 | ## Errors
 9 |
10 | @dataclass
   | ^^^^^^^^^^
11 | class E(Enum): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:14:1
   |
14 | @dataclass  # Foobar
   | ^^^^^^^^^^
15 | class E(Flag): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:18:1
   |
18 | @dataclass()
   | ^^^^^^^^^^^^
19 | class E(IntEnum): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:22:1
   |
22 | @dataclass()  # Foobar
   | ^^^^^^^^^^^^
23 | class E(IntFlag): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:26:1
   |
26 | / @dataclass(
27 | |     frozen=True
28 | | )
   | |_^
29 |   class E(StrEnum): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:32:1
   |
32 | / @dataclass(  # Foobar
33 | |     frozen=True
34 | | )
   | |_^
35 |   class E(ReprEnum): ...
   |
help: Remove either `@dataclass` or `Enum`

RUF049 An enum class should not be decorated with `@dataclass`
  --> RUF049.py:38:1
   |
38 | / @dataclass(
39 | |     frozen=True
40 | | )  # Foobar
   | |_^
41 |   class E(Enum): ...
   |
help: Remove either `@dataclass` or `Enum`
