Skip to content

Commit cff0dba

Browse files
authored
fix: Cyclic import in hugr.envelope (#1981)
I'm not sure why this didn't get caught by the tests.
1 parent bf0e271 commit cff0dba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hugr-py/src/hugr/envelope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
from enum import Enum
3737
from typing import TYPE_CHECKING, ClassVar
3838

39-
import hugr._serialization.extension as ext_s
40-
4139
if TYPE_CHECKING:
4240
from hugr.package import Package
4341

@@ -78,6 +76,8 @@ def make_envelope_str(package: Package, config: EnvelopeConfig) -> str:
7876

7977
def read_envelope(envelope: bytes) -> Package:
8078
"""Decode a HUGR package from an envelope."""
79+
import hugr._serialization.extension as ext_s
80+
8181
header = EnvelopeHeader.from_bytes(envelope)
8282
payload = envelope[10:]
8383

0 commit comments

Comments
 (0)