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

_Attrib.get, mark the default argument as optional #95

Closed
wants to merge 2 commits into from

Conversation

mr-c
Copy link
Contributor

@mr-c mr-c commented Nov 24, 2023

No description provided.

@scoder
Copy link
Member

scoder commented Nov 25, 2023

Looks good.

@scoder
Copy link
Member

scoder commented Nov 25, 2023

Although, hang on – is that really needed? The argument has a default value, so it's clearly optional.

@mr-c
Copy link
Contributor Author

mr-c commented Nov 27, 2023

Although, hang on – is that really needed? The argument has a default value, so it's clearly optional.

mypy versions after 0.600 does require explicit marking of optional inputs. Also, the stub doesn't currently list the default value so that couldn't be inferred anyhow.

https://mypy.readthedocs.io/en/stable/kinds_of_types.html#no-strict-optional has a (slightly confusing) explanation

@scoder
Copy link
Member

scoder commented Jan 8, 2024

Superseded by #97

@scoder scoder closed this Jan 8, 2024
@mr-c mr-c deleted the etree_attrib_get_optional_default branch January 8, 2024 11:12
@mr-c
Copy link
Contributor Author

mr-c commented Jan 8, 2024

Thanks!

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