Skip to content

refactor: add type annotations for formatting util - #1107

Merged
linuxdaemon merged 1 commit into
mainfrom
type-formatting
Dec 2, 2026
Merged

linuxdaemon merged 1 commit into
mainfrom
type-formatting

Conversation

@linuxdaemon

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.83%. Comparing base (c2ae62d) to head (3e65c73).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cloudbot/util/formatting.py 95.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1107      +/-   ##
==========================================
- Coverage   87.83%   87.83%   -0.01%     
==========================================
  Files         300      300              
  Lines       22452    22456       +4     
  Branches     1849     1850       +1     
==========================================
+ Hits        19721    19724       +3     
  Misses       2328     2328              
- Partials      403      404       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the formatting utility type-annotation changes.

No open issues 🎉

What changed in this PR

Adds type annotations to CloudBot’s formatting utilities, improving static type checking for shared helpers and their callers.

Changes:

  • Annotates formatting functions and introduces a mapping protocol.
  • Uses super().__init__() and converts table rows to a list before modification.
  • Removes resolved diagnostics from the Pyrefly baseline.
File Description
cloudbot/​util/​formatting.py Adds type annotations and small implementation adjustments.
.pyrefly/​baseline.json Removes diagnostics resolved by the new annotations and initialization change.

Review effort: Balanced

@linuxdaemon
linuxdaemon merged commit a72c1e0 into main Dec 2, 2026
26 checks passed
@linuxdaemon
linuxdaemon deleted the type-formatting branch December 2, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants