Skip to content

Commit

Permalink
Merge subclass helper (linting)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmccluskey committed Nov 2, 2023
1 parent c7f0b97 commit a1f920a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sdks/python/apache_beam/typehints/typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,11 @@ def __repr__(self):

@staticmethod
def _is_subclass_constraint(sub):
return isinstance(sub, CollectionTypeConstraint) or isinstance(
sub, SetTypeConstraint) or isinstance(sub, FrozenSetTypeConstraint)
return isinstance(
sub, (
CollectionTypeConstraint,
FrozenSetTypeConstraint,
SetTypeConstraint))

def _consistent_with_check_(self, sub):
if self._is_subclass_constraint(sub):
Expand Down

0 comments on commit a1f920a

Please sign in to comment.