Enable Var Assigned to but Unused Flake8 Error

Flake8 currently ignores local variable assigned to but unused error (F841)
Enable F841 for more thorough testing of code

Change-Id: I5a9002dde77773d5e96531e2d4fee3c55264e0fd
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
This commit is contained in:
Eric Barrett 2019-03-22 09:30:52 -04:00
parent 7ae7690285
commit 2d0b003e8c
2 changed files with 1 additions and 8 deletions

View File

@ -569,7 +569,6 @@ def do_libvirt_domain_info(tuple_hosts):
topology = {}
cells = doc.findall('./host/topology/cells/cell')
for cell in cells:
cell_id = int(cell.get('id'))
for cpu in cell.findall('./cpus/cpu'):
# obtain core_id, cpu_id, and socket_id; ignore 'siblings' since
# that can be inferred by enumeration of thread_id.
@ -1184,13 +1183,10 @@ def print_all_tables(tenants=None,
match = re_server_group.search(S.server_group)
if match:
server_group = match.group(1)
sgid = match.group(2)
else:
server_group = '-'
sgid = None
else:
server_group = '-'
sgid = None
# Determine image name based on glance image id if it exists,
# or deduce from attached volume metadata.
@ -1438,7 +1434,6 @@ def get_info_and_display(show=None):
- nova view of volumes and images in-use
- nova view of server-groups in-use
"""
t0 = time.time()
# Keep track of mismatches found when validating data sources
warnings = []
@ -1755,7 +1750,6 @@ def get_info_and_display(show=None):
if S.server_group is not None and S.server_group:
match = re_server_group.search(S.server_group)
if match:
server_group = match.group(1)
server_group_id = match.group(2)
server_groups_in_use[server_group_id] = True

View File

@ -86,13 +86,12 @@ commands =
# B301 Python 3 does not include `.iter*` methods on dictionaries.
# F series
# F401 'module' imported but unused
# F841 local variable '_alarm_state' is assigned to but never used
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,E722,E741,
H101,H102,H104,H201,H238,H237,H306,H401,H404,H405,
W191,W291,W391,W503,
B001,B007,B301,
F401,F841
F401
[testenv:pep8]
basepython = python3