Skip to content

Comments

Fix couple more edge cases type comments/strings#18

Merged
JukkaL merged 1 commit intomainfrom
better-string-comments
Feb 19, 2026
Merged

Fix couple more edge cases type comments/strings#18
JukkaL merged 1 commit intomainfrom
better-string-comments

Conversation

@ilevkivskyi
Copy link
Collaborator

This does two related things:

  • Relocates nested types inside type strings
  • Always allows new union syntax inside strings

This essentially replicates logic from fastparse.py (and btw makes type strings vs type comments more consistent).

@ilevkivskyi
Copy link
Collaborator Author

Cross-ref to mypy PR python/mypy#20848

Copy link
Contributor

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JukkaL JukkaL merged commit a4b7b2d into main Feb 19, 2026
JukkaL pushed a commit to python/mypy that referenced this pull request Feb 19, 2026
@ilevkivskyi ilevkivskyi deleted the better-string-comments branch February 19, 2026 19:22
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