Skip to content

Commit

Permalink
Update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Sep 17, 2024
1 parent f08333c commit 89ebc81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def test_npm_version_for_04_release():
detect_vyper_version_from_source("# pragma version ^0.4.1")

expected_msg = (
"Please use the pypi-style version specifier for vyper versions >= 0.4.0 (hint: ~=0.4.1)"
"Please use the pypi-style version specifier for vyper versions >= 0.4.0 (hint: try ~=0.4.1)"
)
assert str(excinfo.value) == expected_msg
2 changes: 1 addition & 1 deletion vvm/utils/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _detect_version_specifier(source_code: str) -> Specifier:
specifier, version_str = match.groups()
if specifier in ("~", "^"): # convert from npm-style to pypi-style
if Version(version_str) >= Version("0.4.0"):
error = f"Please use the pypi-style version specifier for vyper versions >= 0.4.0 (hint: ~={version_str})"
error = f"Please use the pypi-style version specifier for vyper versions >= 0.4.0 (hint: try ~={version_str})"
raise UnexpectedVersionError(error)
# for v0.x, both specifiers are equivalent
specifier = "~=" # finds compatible versions
Expand Down

0 comments on commit 89ebc81

Please sign in to comment.