Skip to content

Commit 73525bd

Browse files
committed
magic_reset: Add warning about __slots__
Also add __slots__ to will_reset_to.
1 parent 377a3af commit 73525bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

magicbot/magic_reset.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ def execute(self):
2222
2323
2424
.. note:: This will only work for MagicRobot components
25+
26+
.. warning:: This will not work on classes that set ``__slots__``.
2527
"""
2628

29+
__slots__ = ("default",)
30+
2731
def __init__(self, default):
2832
self.default = default

0 commit comments

Comments
 (0)