feat[ux]: improve hint for events kwarg upgrade#4275
feat[ux]: improve hint for events kwarg upgrade#4275charles-cooper merged 24 commits intovyperlang:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4275 +/- ##
=======================================
Coverage 92.12% 92.12%
=======================================
Files 119 119
Lines 16967 16969 +2
Branches 2872 2872
=======================================
+ Hits 15631 15633 +2
Misses 918 918
Partials 418 418 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
there's something interesting going on with examples like i guess mark_tokens() marks the wrong start+end position for the ast node. |
|
i'd say the mark_tokens issue is out of scope -- it should be addressed in #4364 |
|
let's please add some tests |
|
it seems that not all nodes have the source assigned? event Foo:
a: uint256
@external
def foo(a: uint256):
log Foo(a)Foo(a=) notice |
Yea that's what I mentioned here |
oh, that wasn't clear to me from the comment, but i didn't run the attached code in that case can we add 1 xfail test please? |
…ove-event-kwargs-recommendation add tests for event kwargs hint
|
note: waiting on #4364. we should update the logs in the examples directory in this PR as well. |
| recommendation = f"log {node.func.node_source_code}({rec0})" | ||
| msg = "Instantiating events with positional arguments is" | ||
| msg += " deprecated as of v0.4.1 and will be disallowed" | ||
| msg += " in a future release. Use kwargs instead e.g.:" |
There was a problem hiding this comment.
do we need e.g. when we have a concrete recommendation?
What I did
How I did it
How to verify it
try compiling the following file:
Commit message
Description for the changelog
Cute Animal Picture