Skip to content

test: annotate the merge enrichers fixture so pyrefly indexes its fields - #56

Merged
gabrielspadon merged 2 commits into
mainfrom
fix/pyrefly-enrichers-annotation
Sep 28, 2026
Merged

gabrielspadon merged 2 commits into
mainfrom
fix/pyrefly-enrichers-annotation

Conversation

@gabrielspadon

Copy link
Copy Markdown
Collaborator

pyrefly inferred the enrichers literal in test_published_upgrade_keeps_version_metadata_coherent as a list of tuple[str, dict[str, Collection[str]]], so enrichers[1][1]["fields"]["author"] read as indexing a str (bad-index at tests/test_regression.py:1584). Annotating it with the type merge_with_policy declares for that parameter, list[tuple[str, dict[str, Any]]], clears the only pyrefly error in the tree once the environment matches the locks.

The local environment was also behind: it still had bibtexparser 1.4.4 while requirements-*.lock pin 2.0.0, which produced two false missing-import errors until it was reinstalled from the locks the way CI installs them.

  • pyrefly: 0 errors
  • mypy citeforge/ main.py (the CI gate): no issues in 56 files
  • the test passes

@gabrielspadon
gabrielspadon enabled auto-merge (squash) September 28, 2026 00:51
@gabrielspadon
gabrielspadon merged commit b077353 into main Sep 28, 2026
7 checks passed
@gabrielspadon
gabrielspadon deleted the fix/pyrefly-enrichers-annotation branch September 28, 2026 00:53
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