Skip to content

Commit 96a6d48

Browse files
weinbe58claude
andauthored
fix(docs): resolve griffe cyclic alias for bytecode ArchSpec (#343)
griffe detected a cyclic alias between _native.ArchSpec and arch.ArchSpec because arch.py re-exported all _native types using the `X as X` pattern, creating duplicate public aliases alongside the canonical exports in __init__.py. Remove the re-exports from arch.py entirely — it only needs Grid for its own grid_to_rust/grid_from_rust functions. The canonical public API remains through bloqade.lanes.bytecode.__init__.py. Closes #336 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87aa8e7 commit 96a6d48

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

python/bloqade/lanes/bytecode/arch.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
from bloqade.geometry.dialects import grid as geometry_grid
22

3-
from bloqade.lanes.bytecode._native import (
4-
ArchSpec as ArchSpec,
5-
Bus as Bus,
6-
Buses as Buses,
7-
Geometry as Geometry,
8-
Grid as Grid,
9-
TransportPath as TransportPath,
10-
Word as Word,
11-
Zone as Zone,
12-
)
3+
from bloqade.lanes.bytecode._native import Grid
134

145

156
def grid_to_rust(g: geometry_grid.Grid) -> Grid:

python/tests/bytecode/test_arch_spec.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
import pytest
44

55
from bloqade.lanes.bytecode import (
6-
ArchSpecError,
7-
Direction,
8-
LaneAddress,
9-
LocationAddress,
10-
MoveType,
11-
)
12-
from bloqade.lanes.bytecode.arch import (
136
ArchSpec,
7+
ArchSpecError,
148
Bus,
159
Buses,
10+
Direction,
1611
Geometry,
1712
Grid,
13+
LaneAddress,
14+
LocationAddress,
15+
MoveType,
1816
TransportPath,
1917
Word,
2018
Zone,

0 commit comments

Comments
 (0)