Skip to content

Commit 2adc218

Browse files
Implement and enforce explicit re-export for cirq modules (#6722)
* Enable and enforce the `no_implicit_reexport` mypy rule for cirq modules * Update `__init__.py` files so they explicitly re-export public symbols, but do not re-export local symbols or submodules already in parent namespace * Fix few instances of imports from incorrect modules Fixes #6717 --------- Co-authored-by: Pavol Juhas <[email protected]>
1 parent 9edb957 commit 2adc218

File tree

81 files changed

+2014
-1616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2014
-1616
lines changed

cirq-aqt/cirq_aqt/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
"""Types and methods related to the AQT ion trap device"""
1616

17-
from cirq_aqt._version import __version__
18-
19-
from cirq_aqt.aqt_sampler import AQTSampler, AQTSamplerLocalSimulator
20-
from cirq_aqt.aqt_device import AQTSimulator
17+
from cirq_aqt._version import __version__ as __version__
18+
from cirq_aqt.aqt_sampler import (
19+
AQTSampler as AQTSampler,
20+
AQTSamplerLocalSimulator as AQTSamplerLocalSimulator,
21+
)
22+
from cirq_aqt.aqt_device import AQTSimulator as AQTSimulator

cirq-aqt/cirq_aqt/json_test_data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# cirq/protocols/json_serialization_test.py which checks for coverage of
1818
# public classes and tests the correctness of repr and json results
1919

20-
from cirq_aqt.json_test_data.spec import TestSpec
20+
from cirq_aqt.json_test_data.spec import TestSpec as TestSpec

0 commit comments

Comments
 (0)