-
Notifications
You must be signed in to change notification settings - Fork 183
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
Fixes a suspicious setattr that should be taking an Any #604
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #604 +/- ##
=======================================
Coverage 71.98% 71.98%
=======================================
Files 89 89
Lines 7934 7934
=======================================
Hits 5711 5711
Misses 2223 2223 ☔ View full report in Codecov by Sentry. |
Signed-off-by: dblock <dblock@amazon.com>
…t, variable has type Double) [assignment] Signed-off-by: dblock <dblock@amazon.com>
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.
I think this looks good. Wondering how the float field is coming in.
|
||
def test_save_double(mock_client: Any) -> None: | ||
class MyDocumentWithDouble(MyDoc): | ||
a_double: Union[float, field.Double] = field.Double() |
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 is this only float and not field.Float
?
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.
One is a primitive type and the other one is a field.
…roject#604) * Fix invalid value type. Signed-off-by: dblock <dblock@amazon.com> * Workaround Incompatible types in assignment (expression has type float, variable has type Double) [assignment] Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: roma2023 <romasaparhan19@gmail.com>
Description
Fixes a suspicious
setattr
that should be taking anAny
.The
Double
supports__setattr__
assignment with a float, but I am not sure how to express that in the actualDouble
class.Issues Resolved
Related to #602.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.