From f12bdce276c3aec979769d5af61ccd49cd0b5a2d Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 16 Jan 2024 10:26:05 -0600 Subject: [PATCH 1/2] fix: raise error when target is not file/directory --- crytic_compile/crytic_compile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crytic_compile/crytic_compile.py b/crytic_compile/crytic_compile.py index 419a7365..2880f0c2 100644 --- a/crytic_compile/crytic_compile.py +++ b/crytic_compile/crytic_compile.py @@ -737,12 +737,11 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]: vyper_standard_json.add_source_files(vyper_filenames) compilations.append(CryticCompile(vyper_standard_json, **kwargs)) else: - raise NotImplementedError() # TODO split glob into language # # Attempt to perform glob expansion of target/filename # globbed_targets = glob.glob(target, recursive=True) # print(globbed_targets) - # raise ValueError(f"{str(target)} is not a file or directory.") + raise ValueError(f"{str(target)} is not a file or directory.") return compilations From bb8205fafa4eec327769af37d7901040ae3caf74 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 16 Jan 2024 10:28:05 -0600 Subject: [PATCH 2/2] doc error correction --- crytic_compile/crytic_compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crytic_compile/crytic_compile.py b/crytic_compile/crytic_compile.py index 2880f0c2..3996150d 100644 --- a/crytic_compile/crytic_compile.py +++ b/crytic_compile/crytic_compile.py @@ -697,7 +697,7 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]: **kwargs: optional arguments. Used: "solc_standard_json" Raises: - NotImplementedError: If the target could not be compiled + ValueError: If the target could not be compiled Returns: List[CryticCompile]: Returns a list of CryticCompile instances for all compilations which occurred.