Skip to content

Commit 5ef0d92

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made mpc kwargs keyword only
1 parent 8b2d532 commit 5ef0d92

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

astroquery/mpc/core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class MPCClass(BaseQuery):
6565
def __init__(self):
6666
super().__init__()
6767

68-
def query_object_async(self, target_type, get_query_payload=False, *args, **kwargs):
68+
def query_object_async(self, target_type, *, get_query_payload=False, **kwargs):
6969
"""
7070
Query around a specific object within a given mission catalog. When
7171
searching for a comet, it will return the entry with the latest epoch.
@@ -194,9 +194,9 @@ def query_object_async(self, target_type, get_query_payload=False, *args, **kwar
194194
self.get_mpc_object_endpoint(target_type)
195195

196196
kwargs['limit'] = 1
197-
return self.query_objects_async(target_type, get_query_payload, *args, **kwargs)
197+
return self.query_objects_async(target_type, get_query_payload=get_query_payload, **kwargs)
198198

199-
def query_objects_async(self, target_type, get_query_payload=False, *args, **kwargs):
199+
def query_objects_async(self, target_type, *, get_query_payload=False, **kwargs):
200200
"""
201201
Query around a specific object within a given mission catalog
202202
@@ -343,7 +343,7 @@ def get_mpc_object_endpoint(self, target_type):
343343
return mpc_endpoint
344344

345345
@class_or_instance
346-
def get_ephemeris_async(self, target, location='500', start=None, step='1d',
346+
def get_ephemeris_async(self, target, *, location='500', start=None, step='1d',
347347
number=None, ut_offset=0, eph_type='equatorial',
348348
ra_format=None, dec_format=None,
349349
proper_motion='total', proper_motion_unit='arcsec/h',
@@ -610,7 +610,7 @@ def get_ephemeris_async(self, target, location='500', start=None, step='1d',
610610
return response
611611

612612
@class_or_instance
613-
def get_observatory_codes_async(self, get_raw_response=False, cache=True):
613+
def get_observatory_codes_async(self, *, get_raw_response=False, cache=True):
614614
"""
615615
Table of observatory codes from the IAU Minor Planet Center.
616616
@@ -656,7 +656,7 @@ def get_observatory_codes_async(self, get_raw_response=False, cache=True):
656656
return response
657657

658658
@class_or_instance
659-
def get_observatory_location(self, code, cache=True):
659+
def get_observatory_location(self, code, *, cache=True):
660660
"""
661661
IAU observatory location.
662662
@@ -774,7 +774,7 @@ def _args_to_ephemeris_payload(self, **kwargs):
774774
return request_args
775775

776776
@class_or_instance
777-
def get_observations_async(self, targetid,
777+
def get_observations_async(self, targetid, *,
778778
id_type=None,
779779
comettype=None,
780780
get_mpcformat=False,

0 commit comments

Comments
 (0)