Skip to content

Commit 560b581

Browse files
committed
refactor(platforms): remove unnecessary type ignore tags
1 parent f48146f commit 560b581

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

qrand/platforms/qiskit/job.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ def _experiments(self) -> int:
121121
def _experiments(self, experiments: Optional[int]) -> None:
122122
self.__experiments: int = (
123123
experiments
124-
if type(experiments) is int
125-
and 0 < experiments < self.backend.max_experiments # type: ignore
124+
if experiments
125+
and type(experiments) is int
126+
and 0 < experiments < self.backend.max_experiments
126127
else self.backend.max_experiments
127128
)
128129

@@ -138,8 +139,9 @@ def _shots(self) -> int:
138139
def _shots(self, shots: Optional[int]) -> None:
139140
self.__shots: int = (
140141
shots
141-
if type(shots) is int
142-
and 0 < shots < self.backend.max_shots # type: ignore
142+
if shots
143+
and type(shots) is int
144+
and 0 < shots < self.backend.max_shots
143145
else self.backend.max_shots
144146
)
145147

qrand/platforms/qiskit/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def default_backend_filter(b: Backend) -> bool:
9393
config: BackendConfiguration = b.configuration()
9494
return config.memory and not config.simulator
9595

96-
def create_circuit(self, num_qubits: int) -> QiskitCircuit: # type: ignore
96+
def create_circuit(self, num_qubits: int) -> QiskitCircuit:
9797
return QiskitCircuit(num_qubits)
9898

9999
def create_job( # type: ignore

0 commit comments

Comments
 (0)