Skip to content

Drop type:ignore comments made unused by argcomplete 3.7 - #973

Merged
Carreau merged 1 commit into
mainfrom
claude/packaging-ci-breakage-cuqj0s
Aug 9, 2026
Merged

Drop type:ignore comments made unused by argcomplete 3.7#973
Carreau merged 1 commit into
mainfrom
claude/packaging-ci-breakage-cuqj0s

Conversation

@Carreau

@Carreau Carreau commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

The Test Lint job on main has been failing: argcomplete 3.7 ships inline annotations for split_line(), debug() and CompletionFinder.__call__, so the no-untyped-call ignores around those calls are now reported as unused-ignore and mypy exits non-zero.

(For the record, packaging was not involved — I confirmed the suite passes with packaging 26.3, and reverting argcomplete to 3.6.2 makes mypy clean again.)

Changes

  • Removed the no-untyped-call code from three ignores in traitlets/config/argcomplete_config.py (the attr-defined code is still needed and stays).
  • Removed the whole ignore on ExtendedCompletionFinder() in traitlets/config/loader.py.
  • Floored the mypy pre-commit hook's argcomplete dependency at >=3.7 (was >=3.1), so the check means the same thing locally and in CI — on an older argcomplete the ignores would be required again.

The no-untyped-call ignores on super()._get_completions / _get_option_completions are untouched: those private methods are still unannotated.

Verification

mypy clean over 24 source files and 706 tests passing against argcomplete 3.7.2. Test Lint is green on this branch.

https://claude.ai/code/session_0141ZmpAbm5FVsds8iNEotpp

@Carreau
Carreau marked this pull request as ready for review August 9, 2026 09:20
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.14%. Comparing base (1ba6d92) to head (7d21876).

Files with missing lines Patch % Lines
traitlets/config/argcomplete_config.py 50.00% 1 Missing ⚠️
Components Coverage Δ
traitlets 85.50% <66.66%> (ø)
tests 99.06% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Carreau commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Test Lint is green now, which was the point of this PR. The only red check left is codecov/patch, and I don't plan to chase it — here's why.

This diff only edits # type: ignore comments; no executable code changed. Codecov still counts the three touched lines as "patch", and one of them — the argcomplete.debug(...) call at traitlets/config/argcomplete_config.py:76, inside the fallback for a non-integer $_ARGCOMPLETE — has never been covered. That gives 2/3 = 66.66% against the 80% patch target. The traitlets component delta settled at (ø): no coverage was actually lost.

Making that check green would mean adding a test whose only purpose is to exercise a line this PR doesn't touch the behaviour of. Happy to do it if you'd rather have the check green than the diff minimal — just say so.


Generated by Claude Code

argcomplete 3.7 ships inline annotations for split_line(), debug() and
CompletionFinder.__call__, so the no-untyped-call ignores around those
calls are now reported as unused-ignore and the lint job fails.

Remove the stale codes and floor the mypy hook's argcomplete at 3.7 so
the check behaves the same locally and in CI.
@Carreau
Carreau force-pushed the claude/packaging-ci-breakage-cuqj0s branch from 2494e22 to 7d21876 Compare August 9, 2026 09:23
@Carreau Carreau changed the title Update argcomplete requirement and remove obsolete type ignores Drop type:ignore comments made unused by argcomplete 3.7 Aug 9, 2026
@Carreau
Carreau merged commit 1dae189 into main Aug 9, 2026
30 of 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