From 0e70bb9af3b9405e878700080b9d770af137afdb Mon Sep 17 00:00:00 2001 From: Ben Hauser Date: Sun, 2 Aug 2020 20:19:53 +0300 Subject: [PATCH] fix: multiple pragma statements --- brownie/project/sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brownie/project/sources.py b/brownie/project/sources.py index 7c667f479..0f9cb02b3 100644 --- a/brownie/project/sources.py +++ b/brownie/project/sources.py @@ -169,7 +169,7 @@ def get_contract_names(full_source: str) -> List: comment_regex = r"(?:\s*\/\/[^\n]*)|(?:\/\*[\s\S]*?\*\/)" uncommented_source = re.sub(comment_regex, "", full_source) contracts = re.findall( - r"((?:abstract contract|contract|library|interface)\s[^;{]*{[\s\S]*?})\s*(?=(?:abstract contract|contract|library|interface)\s|$)", # NOQA: E501 + r"((?:abstract contract|contract|library|interface)\s[^;{]*{[\s\S]*?})\s*(?=(?:abstract contract|contract|library|interface|pragma)\s|$)", # NOQA: E501 uncommented_source, )