Skip to content
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

Fixes Pyright type errors for src/flask/helpers.py #5548

Closed

Conversation

brendon-codes
Copy link

Fixes Pyright type errors for src/flask/helpers.py.

NOTE: This could be a risky fix. I expect it probably needs extra scrutiny.

fixes #5547

@brendon-codes brendon-codes marked this pull request as ready for review August 7, 2024 00:08
@davidism
Copy link
Member

davidism commented Aug 7, 2024

NOTE: This could be a risky fix. I expect it probably needs extra scrutiny.

Adding type: ignore[...], # pyright: ignore or t.cast() (depending on the situation, but prefer ignores) is also a valid way to satisfy the type checker. Remember, this is a library, so the types are about advertising what our API is first, and then checking our own code second.

@brendon-codes brendon-codes reopened this Aug 7, 2024
@brendon-codes brendon-codes deleted the pyright-types-fixes-helpers branch August 7, 2024 00:30
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2024
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.

Pyright type errors: src/flask/helpers.py
2 participants