Skip to content

Commit

Permalink
fix: Restore self in class method
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Oct 16, 2024
1 parent 731b8a1 commit 180175d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qibo/transpiler/unroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
class FlagMeta(EnumMeta):
"""Metaclass for :class:`qibo.transpiler.unroller.NativeGates` that allows initialization with a list of gate name strings."""

def __getitem__(cls, keys):
def __getitem__(self, keys):
if isinstance(keys, str):
return super().__getitem__(keys)
return reduce(or_, [cls[key] for key in keys]) # pylint: disable=E1136
return reduce(or_, [self[key] for key in keys]) # pylint: disable=E1136


class NativeGates(Flag, metaclass=FlagMeta):
Expand Down

0 comments on commit 180175d

Please sign in to comment.