-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix retry_on_error type annotation
#446
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #446 +/- ##
==========================================
+ Coverage 96.27% 96.47% +0.19%
==========================================
Files 11 11
Lines 1074 1078 +4
Branches 209 190 -19
==========================================
+ Hits 1034 1040 +6
Misses 19 19
+ Partials 21 19 -2
Continue to review full report in Codecov by Sentry.
|
|
Ran into this as well, would really like to see this merged. Can further confirm that if you pass in instances mypy is satisfied but my code breaks. Even in the test code for arq the correct types are passed, even though this isn't detected by CI: |
retry_on_error type annotation
Viicos
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.
Thanks @armicron
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #446 +/- ##
==========================================
- Coverage 96.27% 96.02% -0.26%
==========================================
Files 11 11
Lines 1074 1081 +7
Branches 209 144 -65
==========================================
+ Hits 1034 1038 +4
- Misses 19 21 +2
- Partials 21 22 +1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
When a list of classes (not instances) is assigned to
RedisSettings.retry_on_error, mypy finds an error:Redis library for the similar parameter has the type annotation
Optional[List[Type[Exception]]](source)How to reproduce:
create a file
arq/poc_annotations.py