Fix type annotation for interpolations (*varargs gives a tuple)

This commit is contained in:
Isaiah Odhner 2023-04-22 14:10:06 -04:00
parent 00ab062d3e
commit 91dd804f4a

View File

@ -77,7 +77,7 @@ def get(base_language_str: str, *interpolations: str) -> str:
f.write(base_language_str + "\n") f.write(base_language_str + "\n")
return base_language_str return base_language_str
def interpolate(text: str, interpolations: list): def interpolate(text: str, interpolations: tuple[str]):
for i in range(len(interpolations)): for i in range(len(interpolations)):
text = text.replace(f"%{i + 1}", interpolations[i]) text = text.replace(f"%{i + 1}", interpolations[i])
return text return text