Skip to content

Commit c42dd7a

Browse files
committed
simplify use_json variable call
1 parent b4ccc43 commit c42dd7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

astroquery/mast/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def query_region_async(self, coordinates, *, radius=0.2*u.deg, catalog="Hsc",
163163
params[prop] = value
164164

165165
# Parameters will be passed as JSON objects only when accessing the PANSTARRS API
166-
use_json = True if catalog.lower() == 'panstarrs' else False
166+
use_json = catalog.lower() == 'panstarrs'
167167

168168
return self._current_connection.service_request_async(service, params, pagesize=pagesize, page=page,
169169
use_json=use_json)
@@ -318,7 +318,7 @@ def query_criteria_async(self, catalog, *, pagesize=None, page=None, **criteria)
318318
params["filters"] = filters
319319

320320
# Parameters will be passed as JSON objects only when accessing the PANSTARRS API
321-
use_json = True if catalog.lower() == 'panstarrs' else False
321+
use_json = catalog.lower() == 'panstarrs'
322322

323323
return self._current_connection.service_request_async(service, params, pagesize=pagesize, page=page,
324324
use_json=use_json)

0 commit comments

Comments
 (0)