Skip to content

Commit d8ef3a3

Browse files
committed
Raise more descriptive error if ruff formatting fails
1 parent e3b8de6 commit d8ef3a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/make_script.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def main(args):
7878
# read the formatted content back
7979
with open(temp_file_path) as temp_file:
8080
sim_string = temp_file.read()
81+
except subprocess.CalledProcessError:
82+
raise RuntimeError(
83+
"Ruff formatting failed. Your script might not be compatible with make_script.py. "
84+
"This could be due to unsupported features like CustomMedium."
85+
)
8186
finally:
8287
# remove the temporary file
8388
os.remove(temp_file_path)

0 commit comments

Comments
 (0)