Generate commands/fix det command rename (#881)

* made a link to bash autocompletion script in main folder, and replaced all references to 'det' command with 'sls_detector'
This commit is contained in:
2023-12-13 15:38:10 +01:00
committed by GitHub
parent ce7270e8a2
commit 51412f40cf
7 changed files with 106 additions and 101 deletions

View File

@ -93,7 +93,7 @@ class CodeGenerator:
with function('int', f"InferAction::{command['function_alias']}", []) as f:
if (command_name, -1) in non_dist| type_dist:
self.write_line(
f'throw RuntimeError("det is disabled for command: {command_name}. Use detg or detp");')
f'throw RuntimeError("sls_detector is disabled for command: {command_name}. Use detg or detp");')
elif not command['infer_action']:
self.write_line('throw RuntimeError("infer_action is disabled");')
else:
@ -107,7 +107,7 @@ class CodeGenerator:
# check if this argc is not distinguishable
if (command_name, arg["argc"]) in non_dist | type_dist:
self.write_line(
f'throw RuntimeError("det is disabled for command: {command_name} with number of arguments {arg["argc"]}. Use detg or detp");')
f'throw RuntimeError("sls_detector is disabled for command: {command_name} with number of arguments {arg["argc"]}. Use detg or detp");')
else:
self.write_line(f'return {self.actions_dict[action]};')
with else_block():