Skip to content

Fix type-check failures with ty 0.0.87 - #1774

Merged
kmvanbrunt merged 1 commit into
python-cmd2:mainfrom
DG-Elom:fix/ty-0.0.87-overrides
Oct 14, 2026
Merged

kmvanbrunt merged 1 commit into
python-cmd2:mainfrom
DG-Elom:fix/ty-0.0.87-overrides

Conversation

@DG-Elom

@DG-Elom DG-Elom commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ty 0.0.87 (released 2026-10-13 23:06 UTC) reports 3 new diagnostics on main, so the type-check jobs now fail on every PR (e.g. #1773):

error[invalid-mutable-override]: Invalid override of attribute `formatter_class`
   --> cmd2/argparse_utils.py:771:9
error[invalid-attribute-override]: Invalid override of attribute `description`
   --> cmd2/argparse_utils.py:772:9
error[invalid-attribute-override]: Invalid override of attribute `epilog`
   --> cmd2/argparse_utils.py:773:9

These are the intentional re-declarations for rich-argparse that already carry # type: ignore[assignment] for mypy, so this adds the matching # ty: ignore[...] comments, following the existing # type: ignore[...] # ty: ignore[...] convention in this file.

Checked locally on top of main with ty 0.0.87: ty check passes, mypy reports no issues, and ruff check/format are clean.

@DG-Elom
DG-Elom requested a review from kmvanbrunt as a code owner October 14, 2026 11:45
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.75%. Comparing base (01a52e8) to head (e3789ef).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1774   +/-   ##
=======================================
  Coverage   99.75%   99.75%           
=======================================
  Files          23       23           
  Lines        6473     6473           
=======================================
  Hits         6457     6457           
  Misses         16       16           
Flag Coverage Δ
unittests 99.75% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@kmvanbrunt
kmvanbrunt merged commit 93cfe81 into python-cmd2:main Oct 14, 2026
32 checks passed
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