Skip to content

Commit c302f50

Browse files
committed
fix: better error when content is not correct
1 parent 579dd57 commit c302f50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vyper/cli/vyper_compile.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def compile_files(
376376
# rare, strange race conditions if the file changes in between
377377
# the two reads).
378378
file = input_bundle.load_file(file_path)
379-
assert isinstance(file, FileInput) # mypy hint
379+
file = input_bundle.load_file(file_path)
380+
if not isinstance(file, FileInput):
381+
raise ValueError(f"Invalid Vyper content: '{file_path}'")
380382

381383
storage_layout_override = None
382384
if storage_layout_paths:

0 commit comments

Comments
 (0)