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

Typehint states it is optional, but no default value is provided. #250

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

PaulJonasJost
Copy link
Collaborator

Add None as default value, due to optionality.

@PaulJonasJost PaulJonasJost self-assigned this Mar 12, 2024
@PaulJonasJost PaulJonasJost requested a review from a team as a code owner March 12, 2024 20:03
Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typehint states it is optional, but no default value is provided

x: Optional[pd.DataFrame] does not imply that it's an optional argument (i.e. should have a default value). It just means that None is a valid value. The naming is very unfortunate. But fine to default to None in this specific case.

@PaulJonasJost
Copy link
Collaborator Author

Typehint states it is optional, but no default value is provided

x: Optional[pd.DataFrame] does not imply that it's an optional argument (i.e. should have a default value). It just means that None is a valid value. The naming is very unfortunate. But fine to default to None in this specific case.

True perhaps the naming is just unfortunate. Also saw no problem in None as default value. Thanks, will merge.

@PaulJonasJost PaulJonasJost merged commit a5e771e into develop Mar 13, 2024
7 checks passed
@PaulJonasJost PaulJonasJost deleted the get_parameter_mapping_for_condition_typehint branch March 13, 2024 00:19
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