Get rid of a lot of flake8 errors

This commit is contained in:
Dave Halter
2020-01-01 02:37:48 +01:00
parent 818577f423
commit 66ad620692
12 changed files with 47 additions and 47 deletions

View File

@@ -50,7 +50,10 @@ class CompiledObject(Value):
return_annotation = self.access_handle.get_return_annotation()
if return_annotation is not None:
# TODO the return annotation may also be a string.
return create_from_access_path(self.inference_state, return_annotation).execute_annotation()
return create_from_access_path(
self.inference_state,
return_annotation
).execute_annotation()
try:
self.access_handle.getattr_paths(u'__call__')
@@ -411,10 +414,11 @@ class CompiledObjectFilter(AbstractFilter):
self.is_instance = is_instance
def get(self, name):
access_handle = self.compiled_object.access_handle
return self._get(
name,
lambda name, unsafe: self.compiled_object.access_handle.is_allowed_getattr(name, unsafe),
lambda name: name in self.compiled_object.access_handle.dir(),
lambda name, unsafe: access_handle.is_allowed_getattr(name, unsafe),
lambda name: name in access_handle.dir(),
check_has_attribute=True
)