We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f0dd79 commit 01ed34aCopy full SHA for 01ed34a
mypy/plugins/dataclasses.py
@@ -461,9 +461,10 @@ def add_slots(
461
existing_slots = info.names.get("__slots__")
462
slots_defined_by_plugin = existing_slots is not None and existing_slots.plugin_generated
463
if (
464
- (info.slots is not None and info.slots != generated_slots and not slots_defined_by_plugin)
465
- or (existing_slots is not None and not slots_defined_by_plugin)
466
- ):
+ info.slots is not None
+ and info.slots != generated_slots
+ and not slots_defined_by_plugin
467
+ ) or (existing_slots is not None and not slots_defined_by_plugin):
468
# This means we have a slots conflict.
469
# Class explicitly specifies a different `__slots__` field.
470
# And `@dataclass(slots=True)` is used.
0 commit comments