diff --git a/ape_vyper/compiler.py b/ape_vyper/compiler.py index 4efa00f1..a3a5068c 100644 --- a/ape_vyper/compiler.py +++ b/ape_vyper/compiler.py @@ -82,7 +82,9 @@ def get_version_pragma_spec(source: Union[str, Path]) -> Optional[SpecifierSet]: pragma_match = next(re.finditer(r"(?:\n|^)\s*#\s*@version\s*([^\n]*)", source_str), None) if pragma_match is None: # support new pragma syntax - pragma_match = next(re.finditer(r"(?:\n|^)\s*#pragma\s+version\s*([^\n]*)", source_str), None) + pragma_match = next( + re.finditer(r"(?:\n|^)\s*#pragma\s+version\s*([^\n]*)", source_str), None + ) if pragma_match is None: return None # Try compiling with latest @@ -97,6 +99,7 @@ def get_version_pragma_spec(source: Union[str, Path]) -> Optional[SpecifierSet]: logger.warning(f"Invalid pragma spec: '{raw_pragma}'. Trying latest.") return None + def get_optimization_pragma(source: Union[str, Path]) -> Optional[str | bool]: """ Extracts optimization pragma information from Vyper source code. @@ -113,7 +116,6 @@ def get_optimization_pragma(source: Union[str, Path]) -> Optional[str | bool]: return pragma_match.groups()[0] - class VyperCompiler(CompilerAPI): @property def config(self) -> VyperConfig: