mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
webconfig: Replace str.stripprefix with str.removeprefix
str.stripprefix doesn't exist in Python:
https://docs.python.org/3/library/stdtypes.html#str.removeprefix
Closes #11840
(cherry picked from commit 4b21e7c9c7)
This commit is contained in:
committed by
Johannes Altmanninger
parent
1d5ae08696
commit
ec4700308e
@@ -243,11 +243,13 @@ def parse_color(color_str):
|
||||
elif comp == "--underline" or comp == "-u":
|
||||
underline = "single"
|
||||
elif comp.startswith("--underline="):
|
||||
underline = comp.stripprefix("--underline=")
|
||||
# TODO(python>3.8): use removeprefix
|
||||
underline = comp[len("--underline=") :]
|
||||
elif comp.startswith(
|
||||
"-u"
|
||||
): # Multiple short options like "-rucurly" are not yet supported.
|
||||
underline = comp.stripprefix("-u")
|
||||
# TODO(python>3.8): use removeprefix
|
||||
underline = comp[len("-u") :]
|
||||
elif comp == "--italics" or comp == "-i":
|
||||
italics = True
|
||||
elif comp == "--dim" or comp == "-d":
|
||||
|
||||
Reference in New Issue
Block a user