Enable Mixed Spaces and Tabs flake8 Error

Flake8 currently ignores indentation that contains mixed spaces and tabs
Enable it for more thorough testing of code

Story: 2004515
Task: 30076
Change-Id: I268f1c5695bf913daee7497191e6f9546d51e6a0
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
This commit is contained in:
Eric Barrett 2019-03-18 15:32:57 -04:00
parent 81a1a248cb
commit 8d42ceeecb
3 changed files with 10 additions and 11 deletions

View File

@ -123,8 +123,8 @@ def create_partitions(disk_path, partition_sizes):
# GPT partitions on the storage node so nothing to remove in this case
links = []
if os.path.isdir(DISK_BY_PARTUUID):
links = [ os.path.join(DISK_BY_PARTUUID,l) for l in os.listdir(DISK_BY_PARTUUID)
if os.path.islink(os.path.join(DISK_BY_PARTUUID, l)) ]
links = [ os.path.join(DISK_BY_PARTUUID,l) for l in os.listdir(DISK_BY_PARTUUID)
if os.path.islink(os.path.join(DISK_BY_PARTUUID, l)) ]
# Erase all partitions on current node by creating a new GPT table
_, err, ret = command(["parted", "-s", disk_node, "mktable", "gpt"])

View File

@ -663,13 +663,13 @@ def collectPostgres(influx_info, node, ci):
fields1["dead_tuples"] = int(elements[6])
influx_string1 += "{},'{}'='{}','{}'='{}','{}'='{}','{}'='{}' '{}'='{}','{}'='{}','{}'='{}','{}'='{}','{}'='{}'".format(measurement1, "node", tags["node"], "service", tags["service"], "table_schema", tags["table_schema"], "table", tags["table"], "table_size", fields1["table_size"], "index_size", fields1["index_size"], "total_size", fields1["total_size"], "live_tuples", fields1["live_tuples"], "dead_tuples", fields1["dead_tuples"]) + "\n"
good_string = True
dbcount += 1
if dbcount == BATCH_SIZE and good_string:
# Curl will barf if the batch is too large
p = Popen("curl -s -o /dev/null 'http://'{}':'{}'/write?db='{}'' --data-binary '{}'".format(influx_info[0], influx_info[1], influx_info[2], influx_string1), shell=True)
p.communicate()
influx_string1 = ""
dbcount = 0
dbcount += 1
if dbcount == BATCH_SIZE and good_string:
# Curl will barf if the batch is too large
p = Popen("curl -s -o /dev/null 'http://'{}':'{}'/write?db='{}'' --data-binary '{}'".format(influx_info[0], influx_info[1], influx_info[2], influx_string1), shell=True)
p.communicate()
influx_string1 = ""
dbcount = 0
if good_string:
# send table data to InfluxDB
p = Popen("curl -s -o /dev/null 'http://'{}':'{}'/write?db='{}'' --data-binary '{}'".format(influx_info[0], influx_info[1], influx_info[2], influx_string), shell=True)

View File

@ -37,7 +37,6 @@ commands =
[flake8]
# E series are pep8
# E101 indentation contains mixed spaces and tabs
# E121 continuation line under-indented for hanging indent
# E123 closing bracket does not match indentation of opening bracket's line
# E124 closing bracket does not match visual indentation
@ -92,7 +91,7 @@ commands =
# F series
# F401 'module' imported but unused
# F841 local variable '_alarm_state' is assigned to but never used
ignore = E101,E121,E123,E124,E125,E126,E127,E128,E201,E202,E203,E211,E221,E222,E225,E226,E231,E251,E261,E265,E266,
ignore = E121,E123,E124,E125,E126,E127,E128,E201,E202,E203,E211,E221,E222,E225,E226,E231,E251,E261,E265,E266,
E302,E303,E305,E402,E501,E711,E722,E741,E999,
H101,H102,H104,H201,H238,H233,H237,H306,H401,H404,H405,
W191,W291,W391,W503,