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

Erroneous type hinting breaks functions with parameters with default value of None #120

Open
aricooperdavis opened this issue Jan 17, 2025 · 0 comments · May be fixed by #121
Open

Erroneous type hinting breaks functions with parameters with default value of None #120

aricooperdavis opened this issue Jan 17, 2025 · 0 comments · May be fixed by #121

Comments

@aricooperdavis
Copy link

A small number of functions have a default parameter of None but a type hint that doesn't include None, e.g.

The fix is to change type = None to Union[type, None] = None in order to allow the default parameter of None to be passed to the function.

@aricooperdavis aricooperdavis changed the title Erroneous type hinting breaks functions with default parameter of None Erroneous type hinting breaks functions with parameters with default value of None Jan 17, 2025
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