-
-
Notifications
You must be signed in to change notification settings - Fork 230
Check type hints with mypy #37065
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
base: master
Are you sure you want to change the base?
Check type hints with mypy #37065
Conversation
85c00b5 to
af797dd
Compare
|
@mjriley this is the type checking GitHub Action I mentioned, and a branch I find helpful for navigating unclear parameters. |
Adds type hints for `bulk_update_cases()` parameters so that nobody needs to get them wrong again, and adds type hint for `submit_case_blocks()` return values so that the next person doesn't have to spend half an hour looking them up again.
|
|
||
|
|
||
| def bulk_update_cases(domain, case_changes, device_id, xmlns=None): | ||
| type CaseID = str |
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 type statement declares an alias, for simplifying types and giving them self-explanatory names. (Python 3.12+)
biyeun
left a comment
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.
🎉
Technical Summary
submit_case_blocks()andsubmit_form_locally().🐡 🐠 🐟
Safety Assurance
Safety story
No changes to functionality
Automated test coverage
Not applicable
QA Plan
Not applicable
Rollback instructions
Labels & Review