Skip to content

Commit

Permalink
chore: simplify bidi.py:_RequestQueueGenerator._is_active() (#563)
Browse files Browse the repository at this point in the history
Simplify using DeMorgan's law
  • Loading branch information
vchudnov-g committed Dec 1, 2023
1 parent 091b4f1 commit 42e8b6e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions google/api_core/bidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ def _is_active(self):
# property is set. So we have to check if self.call is set before
# seeing if it's active. We need to return True if self.call is None.
# See https://github.com/googleapis/python-api-core/issues/560.
if self.call is not None and not self.call.is_active():
return False
else:
return True
return self.call is None or self.call.is_active()

def __iter__(self):
if self._initial_request is not None:
Expand Down

0 comments on commit 42e8b6e

Please sign in to comment.