Skip to content

Commit

Permalink
Merge pull request #475 from google/google_sync
Browse files Browse the repository at this point in the history
Remove an unnecessary list comprehension.
  • Loading branch information
rchen152 authored Dec 12, 2019
2 parents 64a04d6 + 27d1efb commit f200c4c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pytype/pytd/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,8 @@ def _CollectSuperclasses(self, type_name, collect):
collect: A set() of strings, modified to contain all superclasses.
"""
collect.add(type_name)
superclasses = [name
for name in self._superclasses.get(type_name, [])]

# The superclasses might have superclasses of their own, so recurse.
for superclass in superclasses:
for superclass in self._superclasses.get(type_name, []):
self._CollectSuperclasses(superclass, collect)

def ExpandSuperClasses(self, t):
Expand Down

0 comments on commit f200c4c

Please sign in to comment.