Skip to content

Commit 22f7e4d

Browse files
committed
Use isinstance() not type()
1 parent da856a5 commit 22f7e4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

astroquery/jplhorizons/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def elements_async(self, get_query_payload=False,
809809
request_payload['TLIST'] = "\n".join([str(epoch) for
810810
epoch in
811811
self.epochs])
812-
elif type(self.epochs) is dict:
812+
elif isinstance(self.epochs, dict):
813813
if ('start' not in self.epochs or 'stop' not in self.epochs or
814814
'step' not in self.epochs):
815815
raise ValueError("'epochs' must contain start, "
@@ -1052,7 +1052,7 @@ def vectors_async(self, get_query_payload=False,
10521052
if isinstance(self.epochs, (list, tuple, ndarray)):
10531053
request_payload['TLIST'] = "\n".join([str(epoch) for epoch in
10541054
self.epochs])
1055-
elif type(self.epochs) is dict:
1055+
elif isinstance(self.epochs, dict):
10561056
if ('start' not in self.epochs or 'stop' not in self.epochs or
10571057
'step' not in self.epochs):
10581058
raise ValueError("'epochs' must contain start, " +

0 commit comments

Comments
 (0)