mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
pep8
This commit is contained in:
parent
7e88bac83a
commit
f5b3f6aa0e
@ -3493,7 +3493,7 @@ For example, the selector:
|
|||||||
def repl(mo):
|
def repl(mo):
|
||||||
txt = mo.group()
|
txt = mo.group()
|
||||||
fmt_char = txt[1]
|
fmt_char = txt[1]
|
||||||
suffixes = re.split('\|', txt[3:-1])
|
suffixes = re.split(r'\|', txt[3:-1])
|
||||||
match len(suffixes):
|
match len(suffixes):
|
||||||
case 1 if not suffixes[0]:
|
case 1 if not suffixes[0]:
|
||||||
zero_suffix = one_suffix = more_suffix = fmt_char.lower() + ' '
|
zero_suffix = one_suffix = more_suffix = fmt_char.lower() + ' '
|
||||||
@ -3537,7 +3537,7 @@ For example, the selector:
|
|||||||
case _:
|
case _:
|
||||||
raise ValueError(_('The {} format specifier is not valid').format(fmt_char))
|
raise ValueError(_('The {} format specifier is not valid').format(fmt_char))
|
||||||
|
|
||||||
s = re.sub('{.:?.*?}', repl, template)
|
s = re.sub(r'{.:?.*?}', repl, template)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user