Repository navigation
Preserve qualified user types that shadow typing names - #323
Closed
ryanduguid wants to merge 5 commits into
Closed
ryanduguid wants to merge 5 commits into
ryanduguid wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Qualified user classes named
SequenceorListcurrently becometyping.Sequenceorlistafter their module prefix is removed. Record whether each parsed type was originally qualified so recursive normalisation keeps the user class, while retaining substitutions for the three filtered pybind11 map view classes.Fixes #241. Extend the existing native aliases fixture and regenerate its references for constructors, direct and nested annotations, and foreign module references.
Evidence
With the new native fixture, the baseline generates the first signature; this change generates the second:
uv tool run --with tox-uv toxpasses all 13 configured environments with exit code 0 after regenerating and reviewing the references, including nested userListunder current and legacy producers.uv lock --check,uv sync,uv run pre-commit run --all-filesanduv buildpass. All five configured Gemmi CLI modes run successfully on Python 3.10 to 3.13.The existing diagnostic script has path resolution and exit status bugs, so diagnostics were also checked separately. In all 13 environments, the baseline and candidate produce equal stderr after hexadecimal-token and text-mode newline normalisation against the same native fixture; diagnostic line multiplicities match the references. Reference line order differs on both revisions.
Risk
The change affects types whose original qualified names were shortened before typing-name conversion. The provenance field has a default and is excluded from equality and representation. The existing name-based map-view filter still determines its three substitutions. Dataclass introspection sees the added provenance field.
Unverified
Native Windows/macOS runs, downstream projects and hosted CI remain unverified. Local tox follows its configured environments, including their CMake versions; exact GitHub Actions orchestration was not reproduced.