Skip to content

Commit 26b4e1d

Browse files
authored
Allow for integer type arguments (#187)
Allow for integer type arguments by converting them to floats in the python link.py file.
1 parent 0e9bfdc commit 26b4e1d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

python_lib/qss_compiler/link.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ def on_diagnostic(diag):
9191
if link_options.on_diagnostic is None:
9292
link_options.on_diagnostic = on_diagnostic
9393

94-
for _, value in link_options.arguments.items():
94+
for key, value in link_options.arguments.items():
9595
if not isinstance(value, float):
96-
raise exceptions.QSSArgumentInputTypeError(
97-
f"Only double arguments are supported, not {type(value)}"
98-
)
96+
if isinstance(value, int):
97+
link_options.arguments[key] = float(value)
98+
else:
99+
raise exceptions.QSSArgumentInputTypeError(
100+
f"Only int & double arguments are supported, not {type(value)}"
101+
)
99102

100103
if link_options.input_file is not None and link_options.input_bytes is not None:
101104
raise ValueError("only one of input_file or input_bytes should have a value")

0 commit comments

Comments
 (0)