Skip to content

Commit 01ed34a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9f0dd79 commit 01ed34a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mypy/plugins/dataclasses.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,10 @@ def add_slots(
461461
existing_slots = info.names.get("__slots__")
462462
slots_defined_by_plugin = existing_slots is not None and existing_slots.plugin_generated
463463
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-
):
464+
info.slots is not None
465+
and info.slots != generated_slots
466+
and not slots_defined_by_plugin
467+
) or (existing_slots is not None and not slots_defined_by_plugin):
467468
# This means we have a slots conflict.
468469
# Class explicitly specifies a different `__slots__` field.
469470
# And `@dataclass(slots=True)` is used.

0 commit comments

Comments
 (0)