Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat[lang]: support flags from imported interfaces #4253
feat[lang]: support flags from imported interfaces #4253
Changes from 3 commits
6a87f54
9edcd52
2065c23
c718e28
8a932a3
69e5b3e
8439d5b
2539997
20d1d33
d2e8aea
f9e4004
76824a1
98e4925
be60015
223d6b3
39e955d
785b606
94b70fc
482f306
d936b86
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 113 in vyper/semantics/analysis/constant_folding.py
Codecov / codecov/patch
vyper/semantics/analysis/constant_folding.py#L113
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.
constants or {}
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.
tbh we should do this for all the other things too, since in most cases we end up passing an empty dict for most of these parameters
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.
do you mean to set the default for these params to None? should I do it in this PR?
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.
Yes and yes!
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 am thinking that since
_from_lists
is already passing a dictionary (either empty or with values) for all the params, and it is the only caller of the ctor forInterfaceT
, maybe we can require a dict instead for all the same params in the ctor forInterfaceT
?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 made the changes in 69e5b3e to show what I meant in the previous comment.
Check warning on line 73 in vyper/semantics/types/module.py
Codecov / codecov/patch
vyper/semantics/types/module.py#L73
Check warning on line 76 in vyper/semantics/types/module.py
Codecov / codecov/patch
vyper/semantics/types/module.py#L75-L76
Check warning on line 202 in vyper/semantics/types/module.py
Codecov / codecov/patch
vyper/semantics/types/module.py#L201-L202
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.
can just check
node.is_constant