Some more code quality fixes

This commit is contained in:
Dave Halter
2020-04-11 02:23:23 +02:00
parent bdd4deedc1
commit 02c3d651bd
11 changed files with 10 additions and 22 deletions

View File

@@ -41,7 +41,7 @@ class StubModuleValue(ModuleValue):
def get_filters(self, origin_scope=None):
filters = super(StubModuleValue, self).get_filters(origin_scope)
next(filters) # Ignore the first filter and replace it with our own
next(filters, None) # Ignore the first filter and replace it with our own
stub_filters = self._get_stub_filters(origin_scope=origin_scope)
for f in stub_filters:
yield f
@@ -76,7 +76,7 @@ class TypingModuleWrapper(StubModuleValue):
class TypingModuleContext(ModuleContext):
def get_filters(self, *args, **kwargs):
filters = super(TypingModuleContext, self).get_filters(*args, **kwargs)
yield TypingModuleFilterWrapper(next(filters))
yield TypingModuleFilterWrapper(next(filters, None))
for f in filters:
yield f