chore: simplify bidi.py:_RequestQueueGenerator._is_active() (#563)
Simplify using DeMorgan's law
diff --git a/google/api_core/bidi.py b/google/api_core/bidi.py
index 17d836d..78d98b9 100644
--- a/google/api_core/bidi.py
+++ b/google/api_core/bidi.py
@@ -93,10 +93,7 @@
# 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: