Skip to content

Fix compatibility with pyright 1.1.394#2855

Merged
davidism merged 1 commit intopallets:stablefrom
adamtheturtle:bump-typing-requirements
May 11, 2025
Merged

Fix compatibility with pyright 1.1.394#2855
davidism merged 1 commit intopallets:stablefrom
adamtheturtle:bump-typing-requirements

Conversation

@adamtheturtle
Copy link
Contributor

@adamtheturtle adamtheturtle commented Feb 13, 2025

I use pyright --verifytypes on a project which depends on click. I do not use --ignoreexternal.

With pyright==1.1.394 I started seeing errors.
These are related to how pyright considers instance variables without explicit types to be ambiguous. See https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#ambiguous-types.

Click's CI also fails with the latest pyright, so I ran pip-compile to re-generate the typing requirements, and fixed the issues which came up.

Fixes #2856

@adamtheturtle adamtheturtle force-pushed the bump-typing-requirements branch 3 times, most recently from 366e519 to 147225b Compare February 13, 2025 09:00
@Rowlando13 Rowlando13 added this to the 8.2.1 milestone May 10, 2025
@davidism davidism force-pushed the bump-typing-requirements branch from 147225b to 6fec395 Compare May 11, 2025 13:15
@davidism davidism changed the base branch from main to stable May 11, 2025 13:16
@davidism
Copy link
Member

I had ended up fixing this while updating the dependencies. But you did have a better solution for the ctypes issue, so I'm merging that part.

@davidism davidism merged commit af73ce4 into pallets:stable May 11, 2025
10 checks passed
@adamtheturtle adamtheturtle deleted the bump-typing-requirements branch May 11, 2025 13:20
@davidism davidism modified the milestones: 8.2.1, 9.0.0, 8.2.0 May 14, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with pyright 1.1.394

3 participants