Skip to content

Commit 9171e5b

Browse files
authored
chore: simplify bidi.py:_RequestQueueGenerator._is_active() (#563)
Simplify using DeMorgan's law
1 parent 35a94f2 commit 9171e5b

File tree

1 file changed

+1
-4
lines changed
  • packages/google-api-core/google/api_core

1 file changed

+1
-4
lines changed

packages/google-api-core/google/api_core/bidi.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ def _is_active(self):
9393
# property is set. So we have to check if self.call is set before
9494
# seeing if it's active. We need to return True if self.call is None.
9595
# See https://github.com/googleapis/python-api-core/issues/560.
96-
if self.call is not None and not self.call.is_active():
97-
return False
98-
else:
99-
return True
96+
return self.call is None or self.call.is_active()
10097

10198
def __iter__(self):
10299
if self._initial_request is not None:

0 commit comments

Comments
 (0)