Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixmypy #66

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pytket/extensions/iqm/backends/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def set_iqm_config(
"""Set default value for IQM API token."""
config = IQMConfig.from_default_config_file()
if auth_server_url is not None:
config.auth_server_url = auth_server_url # type: ignore
config.auth_server_url = auth_server_url
if username is not None:
config.username = username # type: ignore
config.username = username
if password is not None:
config.password = password # type: ignore
config.password = password
config.update_default_config_file()
6 changes: 3 additions & 3 deletions pytket/extensions/iqm/backends/iqm.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ def __init__(
config = IQMConfig.from_default_config_file()

if auth_server_url is None:
auth_server_url = config.auth_server_url # type: ignore
auth_server_url = config.auth_server_url
tokens_file = os.getenv("IQM_TOKENS_FILE")
if username is None:
username = config.username # type: ignore
username = config.username
if password is None:
password = config.password # type: ignore
password = config.password
if (username is None or password is None) and tokens_file is None:
raise IqmAuthenticationError()

Expand Down