-
Notifications
You must be signed in to change notification settings - Fork 63
fix: annotate script() #245
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
To allow mypy to analyze typing for annotated functions. Otherwise it complains that "Untyped decorator makes function "ones_like" untyped [misc]" [ghstack-poisoned]
Codecov Report
@@ Coverage Diff @@
## gh/justinchuby/9/base #245 +/- ##
======================================================
Coverage 71.50% 71.50%
======================================================
Files 93 93
Lines 8832 8833 +1
======================================================
+ Hits 6315 6316 +1
Misses 2517 2517
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -52,7 +53,9 @@ def script_check(f: ast.FunctionDef, opset, global_names, source, default_opset= | |||
return convert.top_level_stmt(f) | |||
|
|||
|
|||
def script(opset=None, default_opset=None, **kwargs): | |||
def script( | |||
opset: Optional[values.Opset] = None, default_opset: Optional[Any] = None, **kwargs: Any |
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 Optional[values.Opset]
for default_opset too
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
To allow mypy to analyze typing for annotated functions. Otherwise it complains that "Untyped decorator makes function "ones_like" untyped [misc]" [ghstack-poisoned]
To allow mypy to analyze typing for annotated functions. Otherwise it complains that "Untyped decorator makes function "ones_like" untyped [misc]" [ghstack-poisoned]
To allow mypy to analyze typing for annotated functions. Otherwise it complains that "Untyped decorator makes function "ones_like" untyped [misc]" [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
To allow mypy to analyze typing for annotated functions. Otherwise it complains that "Untyped decorator makes function "ones_like" untyped [misc]"