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

[types-polib] typing for msgctxt of _BaseFile.find is wrongly typed #12502

Closed
DanieleIsoni opened this issue Aug 8, 2024 · 2 comments · Fixed by #12506
Closed

[types-polib] typing for msgctxt of _BaseFile.find is wrongly typed #12502

DanieleIsoni opened this issue Aug 8, 2024 · 2 comments · Fixed by #12506
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome stubs: false positive Type checkers report false errors

Comments

@DanieleIsoni
Copy link

In this line the msgctxt argument is typed as bool when it should be a str. As the documentation of the function says:

msgctxt
string, allows specifying a specific message context for the search.

@srittau srittau added stubs: false positive Type checkers report false errors help wanted An actionable problem of low to medium complexity where a PR would be very welcome labels Aug 9, 2024
@srittau
Copy link
Collaborator

srittau commented Aug 9, 2024

Indeed. Considering this defaults to False, the correct annotation is probably str | Literal[False]. PR welcome!

@ZeroIntensity
Copy link
Member

Created #12506 for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted An actionable problem of low to medium complexity where a PR would be very welcome stubs: false positive Type checkers report false errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants