Enable H902 collection membership evaluation

Change-Id: Ie6fd9f44f8a682397c7b34d4be69bb64351f7558
This commit is contained in:
Ruslan Kamaldinov 2014-11-14 03:25:05 +03:00
parent 281e1e9d39
commit ba00bd454b
3 changed files with 4 additions and 5 deletions

View File

@ -31,8 +31,7 @@ commands = python setup.py build_sphinx
## TODO(ruhe) following checks should be fixed
# E721 do not compare types, use 'isinstance()'
# H306 imports not in alphabetical order
# H902 Use the 'not in' operator for collection membership evaluation
show-source = True
ignore = E123,E125,E721,H306,H404,H803,H902
ignore = E123,E125,E721,H306,H404,H803
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build

View File

@ -33,7 +33,7 @@ class Namespace(object):
self.symbols = symbols
def validate(self, symbol):
if not symbol in self.symbols:
if symbol not in self.symbols:
raise NamespaceValidationException(self.name, symbol)

View File

@ -48,9 +48,9 @@ class Context():
if not name:
name = func_def.function.func_name
if not name in self.functions:
if name not in self.functions:
self.functions[name] = {}
if not num_params in self.functions[name]:
if num_params not in self.functions[name]:
self.functions[name][num_params] = [func_def]
else:
self.functions[name][num_params].append(func_def)