Skip to content

Commit

Permalink
reduced code overhead on bijoy boolean flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Feb 10, 2024
1 parent a80ec57 commit 2c79b38
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions avro/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,12 @@ def output_generator() -> Generator[str, None, None]:
if bijoy:
# Converts output to Bijoy format if applied.
def convert_to_bijoy(text: str) -> str:
text = re.sub('ো', 'ো', text)
text = re.sub('ৌ', 'ৌ', text)
text = re.sub('ৌ', 'ৌ', re.sub('ো', 'ো', text))

for unic in config.AVRO_TO_BIJ:
text = re.sub(unic, config.AVRO_TO_BIJ[unic], text).strip()
text = re.sub(unic, config.AVRO_TO_BIJ[unic], text)

return text
return text.strip()

output = _concurrency_helper(convert_to_bijoy, output)

Expand Down

0 comments on commit 2c79b38

Please sign in to comment.