Skip to content
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

[wip] fix: Namespace API #3799

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Feb 21, 2024

What I did

fix some usability issues with Namespace

add `self` inside module analyser
refactor context manager implementation to use contextlib
change vyper namespace construction to use a classmethod
fix Namespace.__copy__()

TODO: there are some issues in the test suite with using a global namespace.

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

it needs some special handling because of how scopes and `__setitem__`
work.
_
add `self` inside module analyser
refactor context manager implementation to use contextlib
change vyper namespace construction to use a classmethod
@charles-cooper charles-cooper marked this pull request as draft February 21, 2024 18:07
@charles-cooper charles-cooper changed the title fix: Namespace API [wip]fix: Namespace API Feb 21, 2024
@charles-cooper charles-cooper changed the title [wip]fix: Namespace API [wip] fix: Namespace API Feb 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 87.20930% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 68.34%. Comparing base (7d466a6) to head (8b198f5).
Report is 4 commits behind head on master.

Files Patch % Lines
vyper/compiler/__init__.py 60.00% 2 Missing and 2 partials ⚠️
vyper/semantics/analysis/module.py 66.66% 2 Missing and 1 partial ⚠️
vyper/semantics/namespace.py 89.65% 2 Missing and 1 partial ⚠️
vyper/compiler/phases.py 97.14% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3799       +/-   ##
===========================================
- Coverage   85.22%   68.34%   -16.88%     
===========================================
  Files          92       92               
  Lines       13914    13946       +32     
  Branches     3118     3148       +30     
===========================================
- Hits        11858     9532     -2326     
- Misses       1561     3694     +2133     
- Partials      495      720      +225     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

2 participants