Code cleaning
This commit is contained in:
parent
b90994037a
commit
9a89638e54
4 changed files with 13 additions and 13 deletions
|
@ -549,8 +549,8 @@ class RawWrappedTextHelpFormatter(argparse.RawDescriptionHelpFormatter):
|
||||||
ident = m.group(1)
|
ident = m.group(1)
|
||||||
line_text = m.group(2)
|
line_text = m.group(2)
|
||||||
# Wrap each lines and add in result with ident prefix
|
# Wrap each lines and add in result with ident prefix
|
||||||
for l in textwrap.wrap(line_text, width - len(ident)):
|
for subline in textwrap.wrap(line_text, width - len(ident)):
|
||||||
result.append(ident + l)
|
result.append(ident + subline)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -404,10 +404,10 @@ class OracleDB:
|
||||||
if isinstance(order_by, str):
|
if isinstance(order_by, str):
|
||||||
sql += ' ORDER BY {0}'.format(order_by)
|
sql += ' ORDER BY {0}'.format(order_by)
|
||||||
elif (
|
elif (
|
||||||
isinstance(order_by, (list, tuple)) and len(order_by) == 2 and
|
isinstance(order_by, (list, tuple)) and len(order_by) == 2
|
||||||
isinstance(order_by[0], str) and
|
and isinstance(order_by[0], str)
|
||||||
isinstance(order_by[1], str) and
|
and isinstance(order_by[1], str)
|
||||||
order_by[1].upper() in ('ASC', 'UPPER')
|
and order_by[1].upper() in ('ASC', 'UPPER')
|
||||||
):
|
):
|
||||||
sql += ' ORDER BY "{0}" {1}'.format(order_by[0], order_by[1].upper())
|
sql += ' ORDER BY "{0}" {1}'.format(order_by[0], order_by[1].upper())
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -421,10 +421,10 @@ class PgDB:
|
||||||
if isinstance(order_by, str):
|
if isinstance(order_by, str):
|
||||||
sql += ' ORDER BY {0}'.format(order_by)
|
sql += ' ORDER BY {0}'.format(order_by)
|
||||||
elif (
|
elif (
|
||||||
isinstance(order_by, (list, tuple)) and len(order_by) == 2 and
|
isinstance(order_by, (list, tuple)) and len(order_by) == 2
|
||||||
isinstance(order_by[0], str) and
|
and isinstance(order_by[0], str)
|
||||||
isinstance(order_by[1], str) and
|
and isinstance(order_by[1], str)
|
||||||
order_by[1].upper() in ('ASC', 'UPPER')
|
and order_by[1].upper() in ('ASC', 'UPPER')
|
||||||
):
|
):
|
||||||
sql += ' ORDER BY "{0}" {1}'.format(order_by[0], order_by[1].upper())
|
sql += ' ORDER BY "{0}" {1}'.format(order_by[0], order_by[1].upper())
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E501
|
ignore = E501,W503
|
||||||
|
|
Loading…
Reference in a new issue