fix: DeprecationWarning: invalid escape sequence \(
Python 3 interprets string literals as Unicode strings, and therefore \( is treated as an escaped Unicode character. Declare RegEx pattern as a raw string instead by prepending r
This commit is contained in:
parent
d84d02349c
commit
a13d208a28
1 changed files with 1 additions and 1 deletions
|
|
@ -409,7 +409,7 @@ def get_print_style(style=None, print_format=None, for_legacy=False):
|
|||
css = css + '\n' + frappe.db.get_value('Print Style', style, 'css')
|
||||
|
||||
# move @import to top
|
||||
for at_import in list(set(re.findall("(@import url\([^\)]+\)[;]?)", css))):
|
||||
for at_import in list(set(re.findall(r"(@import url\([^\)]+\)[;]?)", css))):
|
||||
css = css.replace(at_import, "")
|
||||
|
||||
# prepend css with at_import
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue