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

fix: raise better error when source content unexpected #4524

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antazoey
Copy link
Contributor

What I did

fixes: #4523

How I did it

Insteat of a mypy assert, raise a more helpful ValueError

How to verify it

Compile a Vyper file with ABI json for the content.
Notice error improvement.

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

improve error message when a .vy. source file content is ABI JSON

Cute Animal Picture

◡̈

@antazoey antazoey force-pushed the fix/error-bad-content branch from c302f50 to f5375dd Compare March 16, 2025 16:13
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.22%. Comparing base (579dd57) to head (1314595).

Files with missing lines Patch % Lines
vyper/cli/vyper_compile.py 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4524      +/-   ##
==========================================
- Coverage   92.24%   92.22%   -0.02%     
==========================================
  Files         123      123              
  Lines       17500    17501       +1     
  Branches     2960     2961       +1     
==========================================
- Hits        16142    16141       -1     
- Misses        946      947       +1     
- Partials      412      413       +1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@antazoey antazoey force-pushed the fix/error-bad-content branch from f5375dd to 1314595 Compare March 16, 2025 17:06
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.

Unhelpful error when content of a Vyper file is not Vyper
2 participants