Skip to content

Commit ec3f48b

Browse files
davidgltbsipocz
authored andcommitted
Replace "type(product_type) is list" by isinstance(product_type, list) in get_obs_products method.
Improve the product_type comments in get_obs_products method.
1 parent 667d254 commit ec3f48b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

astroquery/esa/jwst/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -969,10 +969,10 @@ def get_obs_products(self, *, observation_id=None, cal_level="ALL",
969969
levels, please use get_related_observations functions first.
970970
Possible values: 'ALL', 3, 2, 1, -1
971971
product_type : str or list, optional, default None
972-
List only products of the given type. If None, empty or an element
973-
of the list is empty, all products are listed.
974-
Possible values: 'thumbnail', 'preview', 'auxiliary',
975-
'science', 'info', ['science', 'preview']...
972+
If the string or at least one element of the list is empty, the value is replaced by None.
973+
With None, all products will be downloaded.
974+
Possible string values: 'thumbnail', 'preview', 'auxiliary', 'science' or 'info'.
975+
Posible list values: any combination of string values.
976976
output_file : str, optional
977977
Output file. If no value is provided, a temporary one is created.
978978
@@ -982,7 +982,7 @@ def get_obs_products(self, *, observation_id=None, cal_level="ALL",
982982
Returns the local path where the product(s) are saved.
983983
"""
984984

985-
if (type(product_type) is list and '' in product_type) or not product_type:
985+
if (isinstance(product_type, list) and '' in product_type) or not product_type:
986986
product_type = None
987987
if observation_id is None:
988988
raise ValueError(self.REQUESTED_OBSERVATION_ID)

0 commit comments

Comments
 (0)