From dbd9658ce040c1ec8106af8066d0dce3b768e8d2 Mon Sep 17 00:00:00 2001 From: ssi91 Date: Mon, 19 Feb 2024 09:21:18 -0400 Subject: [PATCH] fix versions parsing RegExp --- brownie/project/sources.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/brownie/project/sources.py b/brownie/project/sources.py index ef0d12564..e56a57244 100644 --- a/brownie/project/sources.py +++ b/brownie/project/sources.py @@ -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}'")