Remove two pep8 ignores and fix corresponding bugs

Tin originally ignored F401 and F841 in pep8 tests [1]. This
patch removes those ignores and fixes the bugs that come from
running the updated tests.

[1] https://github.com/openstack/gluon/blob/master/tox.ini#L42-L43

Change-Id: Ibe96a1eb8f0d3d412c11370fb348d1c1a99404cc
This commit is contained in:
Darla Ahlert 2016-12-14 10:05:36 -06:00
parent 0e0cc14188
commit ce549c8ce7
3 changed files with 3 additions and 5 deletions

View File

@ -96,7 +96,7 @@ class APIGenerator(object):
# parent_identifier_type
parent = table_data['api']['parent']['type']
if parent != 'root':
parent_identifier_type = self.data[parent]['api']['name']
# parent_identifier_type = self.data[parent]['api']['name']
parent_attribute_name =\
table_data['api']['parent']['attribute']
# TODO(hambtw) SubObjectController is not working!!

View File

@ -99,7 +99,6 @@ class ApiNetL3VPN(ApiModelBase):
def handle_port_change(self, key, attributes, shim_data):
if key in self.model.ports:
prev_port = self.model.ports[key]
changes = self.model.ports[key].update_attrs(attributes)
if self.bind_attributes_changed(changes.new):
if self.model.ports[key].get("__state") == "Bound":

View File

@ -39,7 +39,6 @@ builtins = _
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D203: 1 blank line required before class docstring (deprecated in pep257)
# F401: Module imported but unused - TODO(lamt) will fix in future patch set
# F841: Local variable is assigned but not used - TODO(lamt) will fix in future patch set
ignore = D100,D101,D102,D103,D104,D203,F401,F841
# F401: Module imported but unused
ignore = D100,D101,D102,D103,D104,D203,F401
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build