Skip to content

Commit

Permalink
Replace references to DeclareOffsets type alias with Union
Browse files Browse the repository at this point in the history
  • Loading branch information
appleby committed Oct 30, 2019
1 parent 380bec2 commit 4072509
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pyquil/quilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,6 @@ def __repr__(self) -> str:
return '<PRAGMA {}>'.format(self.command)


DeclareOffsets = Iterable[Tuple[int, str]]


class Declare(AbstractInstruction):
"""
A DECLARE directive.
Expand All @@ -894,7 +891,7 @@ class Declare(AbstractInstruction):

def __init__(self, name: str, memory_type: str, memory_size: int = 1,
shared_region: Optional[str] = None,
offsets: Optional[DeclareOffsets] = None):
offsets: Optional[Iterable[Tuple[int, str]]] = None):
self.name = name
self.memory_type = memory_type
self.memory_size = memory_size
Expand All @@ -904,7 +901,7 @@ def __init__(self, name: str, memory_type: str, memory_size: int = 1,
offsets = []
self.offsets = offsets

def asdict(self) -> Dict[str, Union[DeclareOffsets, Optional[str], int]]:
def asdict(self) -> Dict[str, Union[Iterable[Tuple[int, str]], Optional[str], int]]:
return {
'name': self.name,
'memory_type': self.memory_type,
Expand Down

0 comments on commit 4072509

Please sign in to comment.