-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix typing for the tagging service #13077
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
Test Results - Preflight, Unit22 117 tests 20 379 ✅ 7m 26s ⏱️ Results for commit 14c4fd6. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Acceptance7 tests 5 ✅ 3m 9s ⏱️ Results for commit 14c4fd6. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 20m 39s ⏱️ Results for commit 14c4fd6. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files 2 suites 1h 43m 56s ⏱️ Results for commit 14c4fd6. ♻️ This comment has been updated with latest results. |
cd975e5
to
4b35eab
Compare
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.
LGTM! great for a quick fix for the schema creation. as i mentioned in the channel, for a long-term solution we may have to think about this differently, but this will unblock our schema creation test at least!
Motivation
This PR improves the type hints for the
TaggingService
constructor by making explicit the nullability of the arguments.py-avro-schema
would raise an error with the existing implementation since the arguments were not nullable (i.e., notstr | None
) andNone
would not be a good default for a string.In cases like this,
mypy
would raise an error:error: Incompatible default for argument "val" (default has type "None", argument has type "str") [assignment]
).