-
Notifications
You must be signed in to change notification settings - Fork 47
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 literal eval fallback widget #31
add literal eval fallback widget #31
Conversation
@@ -326,14 +326,20 @@ class instance using setattr(self, self.WIDGET_ATTR.format(name), widget). | |||
try: | |||
WidgetType = type2widget(arg_type) | |||
except TypeError: | |||
funcname = getattr(self.func, "__name__", repr(self.func)) |
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.
not directly related to this PR ... but I found that partial
functions weren't working since they don't have a __name__
or __annotation__
attribute.
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
==========================================
+ Coverage 95.76% 95.82% +0.05%
==========================================
Files 13 14 +1
Lines 921 934 +13
==========================================
+ Hits 882 895 +13
Misses 39 39
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.
Looking good! =)
closes #29 by adding a
LiteralEvalEdit
that is used when type inference fails. As this usesliteral_eval
instead ofeval
, this is a "safe" fix, but will miss a lot of edge cases.