Skip to content

Commit

Permalink
Merge pull request #1747 from ssi91/fix-vyper-version-parsing
Browse files Browse the repository at this point in the history
fix versions parsing RegExp
  • Loading branch information
iamdefinitelyahuman authored Feb 24, 2024
2 parents 1da7df6 + dbd9658 commit a05e4d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion brownie/project/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ def get_vyper_pragma_spec(source: str, path: Optional[str] = None) -> NpmSpec:
Returns: NpmSpec object
"""
pragma_match = next(re.finditer(r"(?:\n|^)\s*#\s*@version\s*([^\n]*)", source), None)
pragma_match = next(
re.finditer(r"(?:\n|^)\s*#\s*(?:pragma version|@version)\s*([^\n]*)", source), None
)
if pragma_match is None:
if path:
raise PragmaError(f"No version pragma in '{path}'")
Expand Down

0 comments on commit a05e4d9

Please sign in to comment.