Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fixmypy (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-melf authored Oct 13, 2023
1 parent 58cf54c commit ebde27b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions pytket/extensions/qsharp/backends/azure_quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ def __init__(
"Try reinstalling a compatible version of pytket."
) from e
if resourceId:
config.resourceId = resourceId # type: ignore
config.resourceId = resourceId
if location:
config.location = location # type: ignore
config.location = location
if storage:
config.storage = storage # type: ignore
config.storage = storage
# check required parameters
if any(val is None for val in (config.resourceId, config.location)): # type: ignore
if any(val is None for val in (config.resourceId, config.location)):
raise ValueError(
"Azure Quantum resourceId and location must be provided as"
f" parameter or stored in the config file {get_config_file_path()}"
Expand All @@ -138,7 +138,7 @@ def __init__(
elif e.error_name == "WorkspaceNotFound":
raise RuntimeError(
"No suitable Azure Quantum workspace found. "
f"Check the resourceId is correct: {config.resourceId}" # type: ignore
f"Check the resourceId is correct: {config.resourceId}"
)
else:
raise e
Expand All @@ -150,7 +150,7 @@ def __init__(
except StopIteration:
raise ValueError(
f"Target with id {target_name} "
f"not available at resource {config.resourceId}." # type: ignore
f"not available at resource {config.resourceId}."
)

def default_compilation_pass(self, optimisation_level: int = 2) -> BasePass:
Expand Down
6 changes: 3 additions & 3 deletions pytket/extensions/qsharp/backends/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def set_azure_config(
for your Azure Quantum Workspace. Can be overridden in backend construction."""
config = QSharpConfig.from_default_config_file()
if resourceId is not None:
config.resourceId = resourceId # type: ignore
config.resourceId = resourceId
if location is not None:
config.location = location # type: ignore
config.location = location
if storage is not None:
config.storage = storage # type: ignore
config.storage = storage
config.update_default_config_file()

0 comments on commit ebde27b

Please sign in to comment.