Skip to content

[pre-commit.ci] pre-commit autoupdate #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 17, 2025
Merged

Conversation

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](astral-sh/ruff-pre-commit@v0.11.4...v0.11.5)
- [github.com/RobertCraigie/pyright-python: v1.1.398 → v1.1.399](RobertCraigie/pyright-python@v1.1.398...v1.1.399)
@jakkdl
Copy link
Member

jakkdl commented Apr 16, 2025

ugh this is an ugly one. New pyright version has

Extended reportUnknownVariableType check to include cases where a value whose type is a generic class parameterized by Unknown is assigned to a variable with a declared type.

but dataclass requires explicit annotations on members, which means we need to duplicate annotations.
And for a kicker we need a union in the generic annotation of LoopState, but using | errors on py39, and Union gets auto-replaced by ruff... sooo let's just # type: ignore those.

I don't really expect pyright to reconsider their stance, but opened microsoft/pyright#10336 anyway

@Zac-HD
Copy link
Member

Zac-HD commented Apr 16, 2025

I wouldn't mind dropping py39 a few months early, if that makes it easier?

@jakkdl
Copy link
Member

jakkdl commented Apr 17, 2025

nah it's fine, I just pushed to the wrong origin

Comment on lines -35 to +36
problems: list[Error] = field(default_factory=list)
noqas: dict[int, set[str]] = field(default_factory=dict)
problems: list[Error] = field(default_factory=list[Error])
noqas: dict[int, set[str]] = field(default_factory=dict[int, set[str]])
Copy link
Member

Choose a reason for hiding this comment

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

huh, it seems like pyright needing this duplication of types might be an upstream issue?

Copy link
Member

@jakkdl jakkdl Apr 17, 2025

Choose a reason for hiding this comment

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

intended... microsoft/pyright#10277 (comment)

2025-04-17T22:30:41,090407337+02:00

so yeah hence me opening microsoft/pyright#10336

@Zac-HD Zac-HD merged commit 5bc2d1d into main Apr 17, 2025
11 checks passed
@Zac-HD Zac-HD deleted the pre-commit-ci-update-config branch April 17, 2025 17:40
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