refactor: extract _console.py from __init__.py (PR-1/8)#2474
Open
darion-yaphet wants to merge 1 commit intogithub:mainfrom
Open
refactor: extract _console.py from __init__.py (PR-1/8)#2474darion-yaphet wants to merge 1 commit intogithub:mainfrom
darion-yaphet wants to merge 1 commit intogithub:mainfrom
Conversation
Move Rich UI primitives (BANNER, TAGLINE, StepTracker, get_key, select_with_arrows, console, BannerGroup, show_banner) into a new src/specify_cli/_console.py module. Re-export all symbols from __init__.py to preserve the public API. Add regression guard tests.
7051a67 to
17111c5
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 1 of 8 in the
__init__.pymodule split refactor (design spec).Extracts all Rich UI primitives from the 5880-line
__init__.pyinto a focused_console.pybase-layer module.Moved symbols:
BANNER,TAGLINE— ASCII art constantsStepTracker— live progress tree rendererget_key,select_with_arrows— interactive keyboard inputBannerGroup,show_banner— Typer banner integrationconsole— Rich Console singletonBackward compatibility: All symbols remain importable from
specify_clivia re-exports in__init__.py.Dependency rule:
_console.pyhas zero internal imports (base layer).Test plan
tests/test_console_imports.pyguards all 8 re-exported symbolsfrom specify_cli import console, StepTracker, ...worksspecify --helprenders banner correctly