From 4072509910235514c12e90764c17b253ce49a4d0 Mon Sep 17 00:00:00 2001 From: Mike Appleby <86076+appleby@users.noreply.github.com> Date: Wed, 30 Oct 2019 17:34:51 -0600 Subject: [PATCH] Replace references to DeclareOffsets type alias with Union --- pyquil/quilbase.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py index 7ad90d421..5feddde36 100644 --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -879,9 +879,6 @@ def __repr__(self) -> str: return ''.format(self.command) -DeclareOffsets = Iterable[Tuple[int, str]] - - class Declare(AbstractInstruction): """ A DECLARE directive. @@ -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 @@ -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,