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

configparser.SectionProxy.get(...) doesn't recognise bool as a valid type for argument 2 #12919

Open
Newbytee opened this issue Oct 29, 2024 · 0 comments · May be fixed by #12935
Open

configparser.SectionProxy.get(...) doesn't recognise bool as a valid type for argument 2 #12919

Newbytee opened this issue Oct 29, 2024 · 0 comments · May be fixed by #12935

Comments

@Newbytee
Copy link

Newbytee commented Oct 29, 2024

If one tries to use configparser.SectionProxy.get(str, bool) (as in, get a key by str and use a bool as fallback value), mypy will complain that Argument 2 to "get" of "SectionProxy" has incompatible type "bool"; expected "str | None" . However, in practice this works just fine and you can give SectionProxy a bool as second argument in this context.

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 a pull request may close this issue.

1 participant