mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Use black with -l 120 param.
This commit is contained in:
1 parent
f928738bd5
commit
c021e21309
194 files changed
+6034
-4564
No files matched your search
@@ -60,10 +60,10 @@ def parse_version(version):
|
||||
"""
|
||||
|
||||
release_type_found = False
|
||||
version_infos = re.split(r'(\.|[a-z]+)', version)
|
||||
version_infos = re.split(r"(\.|[a-z]+)", version)
|
||||
version = []
|
||||
for info in version_infos:
|
||||
if info == '.' or len(info) == 0:
|
||||
if info == "." or len(info) == 0:
|
||||
continue
|
||||
try:
|
||||
info = int(info)
|
||||
@@ -77,8 +77,8 @@ def parse_version(version):
|
||||
if len(version) == 2:
|
||||
version.append("000000")
|
||||
# We want rc to be at lower level than dev version
|
||||
if info == 'rc':
|
||||
info = 'c'
|
||||
if info == "rc":
|
||||
info = "c"
|
||||
version.append(info)
|
||||
release_type_found = True
|
||||
if release_type_found is False:
|
||||
@@ -97,6 +97,6 @@ def shlex_quote(s):
|
||||
"""
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
return s if re.match(r'^[-_\w./]+$', s) else '"%s"' % s.replace('"', '\\"')
|
||||
return s if re.match(r"^[-_\w./]+$", s) else '"%s"' % s.replace('"', '\\"')
|
||||
else:
|
||||
return shlex.quote(s)
|
||||
Reference in new issue
Block a user