<!-- If you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form instead. Please consider: - checking our common issues page: https://mypy.readthedocs.io/en/stable/common_issues.html - searching our issue tracker: https://github.com/python/mypy/issues to see if it's already been reported - asking on gitter chat: https://gitter.im/python/typing --> **Bug Report** mypy complaining that class annotated with `@dataclass(slots=True)` has no attribute `__slots__` **To Reproduce** ```python from dataclasses import dataclass class Point1: __slots__ = ('x', 'y') @dataclass(slots=True) class Point2: x: float y: float print(Point1.__slots__) print(Point2.__slots__) ``` **Expected Behavior** No error should be produced **Actual Behavior** Running `python test.py` produces ``` ('x', 'y') ('x', 'y') ``` Running `mypy test.py` produces ``` test.py:15: error: "type[Point2]" has no attribute "__slots__" [attr-defined] Found 1 error in 1 file (checked 1 source file) ``` **Your Environment** - Mypy version used: `1.4.1` - Mypy command-line flags: - Mypy configuration options from `mypy.ini` (and other config files): - Python version used: `3.11.1` <!-- You can freely edit this text, please remove all the lines you believe are unnecessary. -->