lstrip instead of removeprefix for python3.8
This commit is contained in:
parent
202f647375
commit
b3a80ef04a
1 changed files with 2 additions and 1 deletions
|
|
@ -21,4 +21,5 @@ def dedent_and_get_common_whitespace(s: str) -> Tuple[str, str]:
|
|||
if lcp == "":
|
||||
return s, ""
|
||||
break
|
||||
return "\n".join(map(lambda x: x.removeprefix(lcp), lines)), lcp
|
||||
|
||||
return "\n".join(map(lambda x: x.lstrip(lcp), lines)), lcp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue