mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-06 17:31:07 +03:00
fix PEP8 W605 invalid escape sequence
Python 3.7 will get a lot stricter with escape sequences. They must be valid. * https://lintlyci.github.io/Flake8Rules/rules/W605.html * https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
This commit is contained in:
parent
e6d5260c3c
commit
ff90c0246e
11 changed files with 24 additions and 24 deletions
|
@ -53,7 +53,7 @@ UNSET_VERSION_CODE = -0x100000000
|
|||
APK_NAME_PAT = re.compile(".*name='([a-zA-Z0-9._]*)'.*")
|
||||
APK_VERCODE_PAT = re.compile(".*versionCode='([0-9]*)'.*")
|
||||
APK_VERNAME_PAT = re.compile(".*versionName='([^']*)'.*")
|
||||
APK_LABEL_ICON_PAT = re.compile(".*\s+label='(.*)'\s+icon='(.*?)'")
|
||||
APK_LABEL_ICON_PAT = re.compile(r".*\s+label='(.*)'\s+icon='(.*?)'")
|
||||
APK_SDK_VERSION_PAT = re.compile(".*'([0-9]*)'.*")
|
||||
APK_PERMISSION_PAT = \
|
||||
re.compile(".*(name='(?P<name>.*?)')(.*maxSdkVersion='(?P<maxSdkVersion>.*?)')?.*")
|
||||
|
@ -1083,7 +1083,7 @@ def _get_apk_icons_src(apkfile, icon_name):
|
|||
|
||||
"""
|
||||
icons_src = dict()
|
||||
density_re = re.compile('^res/(.*)/{}\.(png|xml)$'.format(icon_name))
|
||||
density_re = re.compile(r'^res/(.*)/{}\.(png|xml)$'.format(icon_name))
|
||||
with zipfile.ZipFile(apkfile) as zf:
|
||||
for filename in zf.namelist():
|
||||
m = density_re.match(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue