refactor: extract watch-mode helpers, replace unicode, add tests#13
Merged
2 commits merged intomainfrom Mar 28, 2026
Merged
Conversation
- Use LOG.debug instead of logging.debug in _detect_hubble_cmd - Replace assert with early-return guards in reader threads - Guard cursor_flow_idx when ordered_keys is empty in watch mode - Close capture file handle on early exit paths to prevent leak - Add missing py.typed marker (referenced in CHANGELOG since v0.4.0) - Add types-PyYAML to dev dependencies for local mypy - Add .mypy_cache, .pytest_cache, .ruff_cache to .gitignore - Bump version to 0.7.1, update changelog
…p 0.7.2 - Extract _handle_key, _draw_header, _draw_content from 271-line nested _run - Replace reconnect_state dict with _ReconnectState dataclass - Replace all Unicode symbols with ASCII equivalents in TUI and CLI output - Add 39 new tests for output helpers, key handling, and error paths (120 total) - Bump version to 0.7.2, update changelog
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
_handle_key,_draw_header,_draw_contentfrom the 271-line nested_runfunction in watch mode, reducing it to ~80 lines of orchestrationreconnect_statemixed-type dict with a_ReconnectStatedataclass_dump_yaml,_write_multi_doc_yaml,_find_unknown_flows,_print_unknown_warnings,_print_summary,_trunc,_print_report,_ReconnectState,_handle_key, and error paths for_parse_duration/_read_flowsTest plan