Skip to content

Commit

Permalink
🚑 Fix wrong API call
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Aug 31, 2023
1 parent 98a46b9 commit 7f8ace0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/translate_shell/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def process_output_firstline(rst: dict) -> str:
insert_paraphrase = " {paraphrase}"
insert_phonetic = " {phonetic}"

sep = ""
insert_text = " {text} "
sections = [
(
"GREEN",
Expand All @@ -42,7 +40,7 @@ def process_output_firstline(rst: dict) -> str:
("BLACK", "WHITE", insert_phonetic.format(phonetic=rst["phonetic"])),
]

prompt = p10k_sections(sections, insert_text, sep)
prompt = p10k_sections(sections)
return prompt


Expand All @@ -56,12 +54,10 @@ def process_output_explain(explain: list[str]) -> str:
# Config
insert_name = " {name}"

sep = ""
insert_text = " {text} "
sections = [
("WHITE", "BLUE", insert_name.format(name=explain[0])),
]
prompt = p10k_sections(sections, insert_text, sep) # type: ignore
prompt = p10k_sections(sections) # type: ignore
prompt += " " + explain[1]
return prompt

Expand All @@ -76,12 +72,10 @@ def process_output_pos(pos: str) -> str:
# Config
insert_pos = " {pos}"

sep = ""
insert_text = " {text} "
sections = [
("WHITE", "BLUE", insert_pos.format(pos=pos)),
]
prompt = p10k_sections(sections, insert_text, sep) # type: ignore
prompt = p10k_sections(sections) # type: ignore
return prompt


Expand Down

0 comments on commit 7f8ace0

Please sign in to comment.