Skip to content

Commit 7343f8e

Browse files
robtaylorclaude
andcommitted
Fix E402 lint errors in backward compatibility stubs
Add noqa: E402 annotations to imports that intentionally come after deprecation warnings. The imports need to be after warnings.warn() so users see the deprecation message when they import these modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 7dd5552 commit 7343f8e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

chipflow_lib/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
# Re-export only the symbols actually used by chipflow-digital-ip and chipflow-examples
2424
# Top-level exports (used by chipflow-examples)
25-
from chipflow import ChipFlowError # noqa: F401
26-
from chipflow import __version__ # noqa: F401
25+
from chipflow import ChipFlowError # noqa: F401, E402
26+
from chipflow import __version__ # noqa: F401, E402
2727

2828
# Internal API (used by tests and CLI)
29-
from chipflow import _parse_config, _get_cls_by_reference, _ensure_chipflow_root, _get_src_loc # noqa: F401
29+
from chipflow import _parse_config, _get_cls_by_reference, _ensure_chipflow_root, _get_src_loc # noqa: F401, E402
3030

3131
# Note: Submodule imports (chipflow_lib.platforms, chipflow_lib.steps, chipflow_lib.config)
3232
# are handled by stub modules in their respective subdirectories

chipflow_lib/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
)
1919

2020
# Re-export the entire config module (used by chipflow-examples via 'import chipflow_lib.config')
21-
from chipflow import config as _config
22-
import sys
21+
from chipflow import config as _config # noqa: E402
22+
import sys # noqa: E402
2323

2424
# Make this module act as a proxy for chipflow.config
2525
sys.modules[__name__] = _config

chipflow_lib/platforms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919

2020
# Re-export symbols used by chipflow-digital-ip and chipflow-examples
21-
from chipflow.platforms import ( # noqa: F401
21+
from chipflow.platforms import ( # noqa: F401, E402
2222
# Pin signatures (used by both repos)
2323
BidirIOSignature,
2424
GPIOSignature,

chipflow_lib/steps/board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
)
1919

2020
# Re-export BoardStep (used by chipflow-examples)
21-
from chipflow.steps.board import BoardStep # noqa: F401
21+
from chipflow.steps.board import BoardStep # noqa: F401, E402

chipflow_lib/steps/sim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
)
1919

2020
# Re-export SimStep (used by chipflow-examples)
21-
from chipflow.steps.sim import SimStep # noqa: F401
21+
from chipflow.steps.sim import SimStep # noqa: F401, E402

chipflow_lib/steps/software.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
)
1919

2020
# Re-export SoftwareStep (used by chipflow-examples)
21-
from chipflow.steps.software import SoftwareStep # noqa: F401
21+
from chipflow.steps.software import SoftwareStep # noqa: F401, E402

0 commit comments

Comments
 (0)