Skip to content

Commit

Permalink
Make mypy pass no matter if qsimcirq is installed or not (#7063)
Browse files Browse the repository at this point in the history
Avoid `[unused-ignore]` error when qsimcirq is installed.
  • Loading branch information
pavoljuhas authored Feb 13, 2025
1 parent 34b9c3b commit d5c2b41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cirq-google/cirq_google/engine/virtual_engine_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def create_default_noisy_quantum_virtual_machine(

if simulator_class is None:
try: # pragma: no cover
import qsimcirq # type: ignore
import qsimcirq

simulator_class = qsimcirq.QSimSimulator # pragma: no cover
except ImportError:
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/conf/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ignore_missing_imports = true
# 3rd-party libs for which we don't have stubs

# Google
[mypy-google.api_core.*,google.auth.*,google.colab.*,google.cloud.*,google.oauth2.*]
[mypy-google.api_core.*,google.auth.*,google.colab.*,google.cloud.*,google.oauth2.*,qsimcirq]
follow_imports = silent
ignore_missing_imports = true

Expand Down

0 comments on commit d5c2b41

Please sign in to comment.