Mutable defaults are a classic trap, and dataclasses refuse them with an error that is easy to misread.
from dataclasses import dataclass, field
@dataclass
class Job:
tags: list[str] = field(default_factory=list)
Writing tags: list[str] = [] raises ValueError: mutable default when the class is defined, because every instance would otherwise share one list. field(default_factory=list) calls list() for each new instance. The same goes for dict, set and any callable that builds a fresh object. Immutable defaults such as numbers, strings and tuples can stay as plain values. The error shows up at import time, so you notice it before any instance exists.
Further reading: dataclasses documentation