Skip to content

fix: satisfy mypy in the stored-key check - #379

Merged
JuroOravec merged 1 commit into
mainfrom
fix/stored-key-mypy
Oct 25, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
fix/stored-key-mypy

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

The "check" job on main fails mypy since #366 merged:

packages/py/citry/citry/cache.py:240: error: Item "None" of "OrderedDict[str, tuple[float, str | None]] | None" has no attribute "move_to_end"  [union-attr]

_recently_confirmed computed confirmed from remembered, then called remembered.move_to_end(key). mypy can't tell from confirmed is not None that remembered isn't None. The function now returns False early when either one is None. Its behavior is the same.

Evidence, run locally:

  • mypy, also with --platform linux: no issues in packages/py/citry/citry.
  • ruff check and ruff format: pass.
  • tests/test_cache.py, tests/test_ext_cache*.py, tests/test_deps_*.py and tests/test_vue_asset_*.py: 594 passed.

PR CI runs the cargo phases and the full test matrix.

🤖 Generated with Claude Code

@JuroOravec
JuroOravec merged commit cada47d into main Oct 25, 2026
1 of 25 checks passed
@JuroOravec
JuroOravec deleted the fix/stored-key-mypy branch October 25, 2026 09:25
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.

1 participant