Try to use yield from instead of yield, if possible
This commit is contained in:
1 parent
5bc174bf8d
commit
9957565b37
21 files changed
+49
-97
No files matched your search
+1
-2
@@ -198,8 +198,7 @@ def filter_follow_imports(names, follow_builtin_imports=False):
|
||||
if found_builtin:
|
||||
yield name
|
||||
else:
|
||||
for new_name in new_names:
|
||||
yield new_name
|
||||
yield from new_names
|
||||
else:
|
||||
yield name
|
||||
|
||||
|
||||
@@ -71,5 +71,4 @@ class MixedModuleContext(ModuleContext):
|
||||
)
|
||||
|
||||
for mixed_object in self.mixed_values:
|
||||
for filter in mixed_object.get_filters(until_position, origin_scope):
|
||||
yield filter
|
||||
yield from mixed_object.get_filters(until_position, origin_scope)
|
||||
Reference in new issue
Block a user