mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-22 14:21:33 +03:00
Fix type annotation for interpolations
(*varargs gives a tuple)
This commit is contained in:
parent
00ab062d3e
commit
91dd804f4a
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user