Repository navigation
Preserve generic arguments and quote strings in conversion type names - #498
Merged
Merged
Conversation
james-d-mitchell
force-pushed
the
codex/fix-450-generic-type-names
branch
2 times, most recently
from
September 10, 2026 08:10
baa9a28 to
3d45ee9
Compare
Joseph-Edwards
left a comment
Collaborator
There was a problem hiding this comment.
I like the changes in this PR. One small suggestion: should the tuples with only one element have a trailing comma?
TypeError: expected the first keyword argument to be one of:
[...]
* (Congruence, str)
* (FroidurePin)
^ comma here?
[...]
james-d-mitchell
force-pushed
the
codex/fix-450-generic-type-names
branch
from
September 12, 2026 11:56
3d45ee9 to
04f82fb
Compare
james-d-mitchell
force-pushed
the
codex/fix-450-generic-type-names
branch
from
September 12, 2026 11:57
04f82fb to
85799ce
Compare
Member
Author
|
@Joseph-Edwards done, and I also renamed the local variables and argument in |
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.
to()error messages lose generic type arguments, makinglist[int]andlist[str]both appear aslist. Usetyping.get_originto preserve these arguments, and wrap string options in double quotes so return types appear as(KnuthBendix, list[int], "Trie", Order.lenlex).Add regression coverage for generic types, existing name formatting, and the valid and rejected types shown in conversion errors.
Fixes #450.
Validation: all 77 conversion tests pass; Ruff lint, Ruff formatting, Pylint, and
git diff --checkpass.