From e846e8a7bdcc4fa29967d211b7fbf452ec970dfb Mon Sep 17 00:00:00 2001 From: Travis Thompson <102229498+trvto@users.noreply.github.com> Date: Thu, 31 Aug 2023 12:56:12 +0200 Subject: [PATCH] fix previously renamed type-def (ResultIdTuple back to _ResultIdTuple) (#991) --- pytket/pytket/backends/backend.py | 4 ++-- pytket/pytket/backends/resulthandle.py | 2 +- pytket/tests/simulator/tket_sim_backend.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pytket/pytket/backends/backend.py b/pytket/pytket/backends/backend.py index 56c9530663..d1b2d989c4 100644 --- a/pytket/pytket/backends/backend.py +++ b/pytket/pytket/backends/backend.py @@ -45,7 +45,7 @@ ) from .backendinfo import BackendInfo from .backendresult import BackendResult -from .resulthandle import ResultHandle, ResultIdTuple +from .resulthandle import ResultHandle, _ResultIdTuple from .status import CircuitStatus ResultCache = Dict[str, Any] @@ -219,7 +219,7 @@ def get_compiled_circuits( @property @abstractmethod - def _result_id_type(self) -> ResultIdTuple: + def _result_id_type(self) -> _ResultIdTuple: """Identifier type signature for ResultHandle for this backend. :return: Type signature (tuple of hashable types) diff --git a/pytket/pytket/backends/resulthandle.py b/pytket/pytket/backends/resulthandle.py index c73bf8f27b..3ffc91222c 100644 --- a/pytket/pytket/backends/resulthandle.py +++ b/pytket/pytket/backends/resulthandle.py @@ -21,7 +21,7 @@ # mypy doesn't think you can pass the tuple to Union BasicHashType = Union[int, float, complex, str, bool, bytes] -ResultIdTuple = Tuple[ +_ResultIdTuple = Tuple[ Union[Type[int], Type[float], Type[complex], Type[str], Type[bool], Type[bytes]], ..., ] diff --git a/pytket/tests/simulator/tket_sim_backend.py b/pytket/tests/simulator/tket_sim_backend.py index c15441e83f..c637985a3d 100644 --- a/pytket/tests/simulator/tket_sim_backend.py +++ b/pytket/tests/simulator/tket_sim_backend.py @@ -27,7 +27,7 @@ from pytket.backends.backend import Backend, KwargTypes from pytket.backends.backend_exceptions import CircuitNotRunError from pytket.backends.backendresult import BackendResult -from pytket.backends.resulthandle import ResultHandle, ResultIdTuple +from pytket.backends.resulthandle import ResultHandle, _ResultIdTuple from pytket.backends.status import CircuitStatus, StatusEnum from pytket.passes import ( BasePass, @@ -86,7 +86,7 @@ def __init__(self, ignore_measures: bool = False): self._ignore_measures = ignore_measures @property - def _result_id_type(self) -> ResultIdTuple: + def _result_id_type(self) -> _ResultIdTuple: return (str,) @property