-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
refactor: merge annotation.py
and local.py
#3456
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #3456 +/- ##
==========================================
- Coverage 89.08% 89.01% -0.07%
==========================================
Files 86 85 -1
Lines 11455 11364 -91
Branches 2605 2585 -20
==========================================
- Hits 10205 10116 -89
- Misses 830 834 +4
+ Partials 420 414 -6
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Some comments before I forget
The mypy lints are a bit ugly, and we cannot do file level ignores yet because we are stuck on mypy 0.910 due to py-evm. Is it okay to remove the type annotations for |
@@ -475,6 +475,12 @@ def evaluate(self, node): | |||
|
|||
return vy_ast.Int.from_node(node, value=length) | |||
|
|||
def infer_arg_types(self, node): |
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.
infer_arg_types
of Len
builtin was returning a python tuple of types.
…ctor/annotation
annotation.py
and local.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.
pushed some final changes/polishing. nice improvement to the typechecking code, great work!
What I did
Annotation at the module level is performed simultaneously with typechecking in
vyper/semantics/analysis/module.py
while annotation at the statement and expression level is performed invyper/semantics/analysis/annotation.py
with typechecking invyper/semantics/analysis/local.py
.This PR merges annotation of statements and expressions into
vyper/semantics/analysis/local.py
for consistency with how it is done for modules, and makes it easier for other possible changes (e.g. moving some folding to after semantics analysis).How I did it
Copy, paste and edit.
How to verify it
See tests.
Commit message
Description for the changelog
Cute Animal Picture