Skip to content

Commit 02dd971

Browse files
author
Ted Spence
committed
Simplified truth case handling
1 parent 699991a commit 02dd971

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lockstep_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ def with_bearer_token(self, bearerToken: str):
102102
Send a request and parse the result
103103
"""
104104
def send_request(self, method: str, path: str, body: object, query_params: object) -> LockstepResponse:
105-
if query_params != None:
105+
if query_params:
106106
url = urllib.parse.urljoin(self.serverUrl, path) + "?" + urllib.parse.urlencode(query_params)
107107
else:
108108
url = urllib.parse.urljoin(self.serverUrl, path)
109109

110-
if self.apiKey != None:
110+
if self.apiKey:
111111
headers = {"Accept": "application/json", "Api-Key": self.apiKey}
112-
elif self.bearerToken != None:
112+
elif self.bearerToken:
113113
headers = {"Accept": "application/json", "Authorization": "Bearer " + self.bearerToken}
114114
else:
115115
headers = {"Accept": "application/json"}

0 commit comments

Comments
 (0)