Skip to content

Update pyright to 1.1.413 - #16409

Open
srittau wants to merge 3 commits into
python:mainfrom
srittau:pyright-1.1.413
Open

srittau wants to merge 3 commits into
python:mainfrom
srittau:pyright-1.1.413

Conversation

@srittau

@srittau srittau commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Closes: #16408

The first version will mostly likely break on non-pyright type checkers.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau marked this pull request as ready for review September 17, 2026 12:43
# ideally this would be `_SpecialForm` (Union)
assert_type(union_type | Literal[1], types.UnionType | Any)
assert_type(union_type | Literal[1], types.UnionType | Any) # pyright: ignore[reportAssertTypeFailure]
# assert_type(union_type | Literal[1], types.UnionType | type[Literal[1]]) # this is what pyright infers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

type[Literal[1]] is a nonsense type -- it's quite unclear what it would/should mean. I don't think it should be valid to parameterize type with Literal[...]. So we could possibly report this as a bug to pyright.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I was wondering about that (but I'm not to familiar with "meta types"). Would you report it? I think a report by you would be clearer than me only half-understanding what I write. I would then just update the comment with a link to the issue.

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