Skip to content

Refine print_table parameter type annotations - #1295

Draft
mulkieran wants to merge 1 commit into
stratis-storage:masterfrom
mulkieran:print_table_types
Draft

Refine print_table parameter type annotations#1295
mulkieran wants to merge 1 commit into
stratis-storage:masterfrom
mulkieran:print_table_types

Conversation

@mulkieran

@mulkieran mulkieran commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Refactor

    • Improved internal table-formatting type consistency by using tuples for table headers, rows, widths, and alignment settings.
    • Updated filesystem, pool, device, and key-listing views to use the revised table-formatting inputs.
    • Preserved existing sorting, displayed values, and table output.
  • Tests

    • Updated formatting test data to match the revised table input types.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran mulkieran added this to the 3.10.0 milestone Sep 11, 2026
@mulkieran mulkieran self-assigned this Sep 11, 2026
@mulkieran mulkieran moved this to In Progress in 2026September Sep 11, 2026
@mulkieran

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 71eacdba-080a-4807-b47c-86a964d4d90a

📥 Commits

Reviewing files that changed from the base of the PR and between ed064c3 and 6e8008f.

📒 Files selected for processing (6)
  • src/stratis_cli/_actions/_formatting.py
  • src/stratis_cli/_actions/_list_filesystem.py
  • src/stratis_cli/_actions/_list_pool.py
  • src/stratis_cli/_actions/_physical.py
  • src/stratis_cli/_actions/_top.py
  • tests/unit/test_formatting.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The pull request tightens table formatting type annotations and changes table headers, alignments, and rows to tuple-based shapes. The width calculation now uses tuple comprehensions and strict zip operations. Formatting tests use the updated shapes.

Changes

Table formatting

Layer / File(s) Summary
Formatting API and width calculation
src/stratis_cli/_actions/_formatting.py
The formatting helpers use tuple annotations. print_table calculates row and column widths with tuples and strict zip.
Tuple-based table callers and validation
src/stratis_cli/_actions/_list_filesystem.py, src/stratis_cli/_actions/_list_pool.py, src/stratis_cli/_actions/_physical.py, src/stratis_cli/_actions/_top.py, tests/unit/test_formatting.py
Table callers pass tuple-based headers, alignments, and rows. Formatting test data uses the updated shapes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6e800

The table formatting update preserves the established output data shapes across its callers and tests, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: refining the print_table parameter type annotations.
Docstring Coverage ✅ Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 6 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant