-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add two overload variants to validate_arguments
#2055
Add two overload variants to validate_arguments
#2055
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2055 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 4094 4094
Branches 821 821
=========================================
Hits 4094 4094
Continue to review full report at Codecov.
|
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.
Other than that looks good 👍
tests/mypy/modules/fail4.py
Outdated
|
||
|
||
# nested decorator should not produce an error | ||
@validate_arguments(config={'arbitrary_types_allowed': True}) |
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.
Why not put it in success.py
instead of fail4.py
?
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.
done
changes/2055-layday.md
Outdated
@@ -0,0 +1 @@ | |||
add two overload variants to `validate_arguments` for the nested decorator signature |
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.
Maybe something more user oriented like "improve/fix typing of validate_arguments
to be compliant with mypy
"
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.
Changed to:
fix annotation of
validate_arguments
when passing configuration as argument
Unrelatedly, I like how all I've got to do is run |
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!
Change Summary
Added two overload variants to
validate_arguments
for the nested decorator signature.Related issue number
fix #2052
Checklist
Documentation reflects the changes where applicablechanges/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)