Skip to content

Fold hex into bytes#2191

Merged
iamdefinitelyahuman merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:hex-folding
Oct 10, 2020
Merged

Fold hex into bytes#2191
iamdefinitelyahuman merged 2 commits into
vyperlang:masterfrom
iamdefinitelyahuman:hex-folding

Conversation

@iamdefinitelyahuman

Copy link
Copy Markdown
Contributor

What I did

Before parsing the Vyper AST, fold hex values into bytes unless they are 20 or 32 bytes long (addresses or bytes32). This reduces some changes for ambiguity later when type checking.

How to verify it

Run the tests. I updated some tests that were failing.

Cute Animal Picture

image

@codecov-io

codecov-io commented Oct 10, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2191 into master will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2191      +/-   ##
==========================================
- Coverage   85.49%   85.42%   -0.08%     
==========================================
  Files          83       83              
  Lines        8503     8519      +16     
  Branches     2056     2060       +4     
==========================================
+ Hits         7270     7277       +7     
- Misses        729      736       +7     
- Partials      504      506       +2     
Impacted Files Coverage Δ
vyper/ast/annotation.py 94.35% <100.00%> (+0.18%) ⬆️
vyper/context/types/value/array_value.py 91.89% <100.00%> (-0.11%) ⬇️
vyper/context/types/indexable/sequence.py 82.75% <0.00%> (-1.86%) ⬇️
vyper/functions/signatures.py 66.10% <0.00%> (-1.70%) ⬇️
vyper/functions/functions.py 89.33% <0.00%> (-0.40%) ⬇️
vyper/ast/nodes.py 93.46% <0.00%> (-0.39%) ⬇️
vyper/context/types/bases.py 89.06% <0.00%> (+0.08%) ⬆️
vyper/context/types/function.py 83.95% <0.00%> (+0.30%) ⬆️
vyper/context/types/meta/struct.py 80.32% <0.00%> (+1.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1fbdcd...643195f. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants