Skip to content

Commit 180175d

Browse files
committed
fix: Restore self in class method
1 parent 731b8a1 commit 180175d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qibo/transpiler/unroller.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
class FlagMeta(EnumMeta):
2121
"""Metaclass for :class:`qibo.transpiler.unroller.NativeGates` that allows initialization with a list of gate name strings."""
2222

23-
def __getitem__(cls, keys):
23+
def __getitem__(self, keys):
2424
if isinstance(keys, str):
2525
return super().__getitem__(keys)
26-
return reduce(or_, [cls[key] for key in keys]) # pylint: disable=E1136
26+
return reduce(or_, [self[key] for key in keys]) # pylint: disable=E1136
2727

2828

2929
class NativeGates(Flag, metaclass=FlagMeta):

0 commit comments

Comments
 (0)