Skip to content

Commit

Permalink
Unreachable Code
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Sep 17, 2024
1 parent 0d3522c commit 557c171
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions vvm/utils/versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ def _detect_version_specifier(source_code: str) -> Specifier:
if Version(version_str) >= Version("0.4.0"):
error = "Please use the pypi-style version specifier for vyper versions >= 0.4.0"
raise UnexpectedVersionError(error)

if specifier == "^" and not version_str.startswith("0."):
# Minor match, remove the patch from the version
# Note: not for 0.x versions, they should only match minor versions
version_str = ".".join(version_str.split(".")[:-1])

# for v0.x, both specifiers are equivalent
specifier = "~=" # finds compatible versions

if specifier == "":
Expand Down

0 comments on commit 557c171

Please sign in to comment.