Get rid of a lot of flake8 errors

This commit is contained in:
Dave Halter
2020-01-01 02:42:31 +01:00
parent 818577f423
commit 66ad620692
12 changed files with 47 additions and 47 deletions
+3 -4
View File
@@ -58,8 +58,8 @@ class Error(object):
return self.__unicode__()
def __eq__(self, other):
return (self.path == other.path and self.name == other.name and
self._start_pos == other._start_pos)
return (self.path == other.path and self.name == other.name
and self._start_pos == other._start_pos)
def __ne__(self, other):
return not self.__eq__(other)
@@ -114,7 +114,6 @@ def _check_for_setattr(instance):
def add_attribute_error(name_context, lookup_value, name):
message = ('AttributeError: %s has no attribute %s.' % (lookup_value, name))
from jedi.inference.value.instance import CompiledInstanceName
# Check for __getattr__/__getattribute__ existance and issue a warning
# instead of an error, if that happens.
typ = Error
@@ -150,7 +149,7 @@ def _check_for_exception_catch(node_context, jedi_name, exception, payload=None)
# Only nodes in try
iterator = iter(obj.children)
for branch_type in iterator:
colon = next(iterator)
next(iterator) # The colon
suite = next(iterator)
if branch_type == 'try' \
and not (branch_type.start_pos < jedi_name.start_pos <= suite.end_pos):