-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
ASF: Mark optional params as such (X | None) #12614
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
Conversation
LocalStack Community integration with Pro 2 files 2 suites 1h 42m 1s ⏱️ Results for commit 218d504. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small and concise change and directly as discussed in the other linked PRs / conversations!
Would it make sense to maybe also update the APIs directly here in the PR in a separate commit and in our downstream project right after merging this one, instead of mixing it with the weekly automatically scheduled execution of the update next Monday? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra annotation for SFN is definitely welcome, as is the possibility to use MyPy; thank you!
Just curious, are there plans/or would it be feasible for us to distinguish between Optional[X]
and NotRequired[X]
? I find that distinction quite useful.
@MEPalma I don't think I've ever used Do you find the distinction useful when invoking a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Motivation
As discussed in #12588 - if we want to enable MyPy on the entire codebase, one of the first steps would be to make sure that the generated API has the correct types.
Changes
X | None = None
instead ofX = None
)test_asf_providers.py::test_provider_signatures
to handle all variations of Optional/Union params