Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions astroquery/vo_conesearch/validator/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ConeSearchResults:
Show download progress bars.

"""
def __init__(self, cache=False, verbose=True):
def __init__(self, *, cache=False, verbose=True):
self.dbtypes = ['good', 'warn', 'exception', 'error']
self.dbs = {}
self.catkeys = {}
Expand All @@ -49,7 +49,7 @@ def __init__(self, cache=False, verbose=True):
'conesearch_' + typ, cache=cache, verbose=verbose)
self.catkeys[typ] = self.dbs[typ].list_catalogs()

def tally(self, fout=None):
def tally(self, *, fout=None):
"""
Tally databases.

Expand All @@ -74,7 +74,7 @@ def tally(self, fout=None):
str_list.append('total: {0} catalog(s)\n'.format(n_tot))
fout.write('\n'.join(str_list))

def list_cats(self, typ, fout=None, ignore_noncrit=False):
def list_cats(self, typ, *, fout=None, ignore_noncrit=False):
"""
List catalogs in given database.

Expand Down Expand Up @@ -131,7 +131,7 @@ def list_cats(self, typ, fout=None, ignore_noncrit=False):
if len(str_list) > 0:
fout.write('\n'.join(str_list))

def print_cat(self, key, fout=None):
def print_cat(self, key, *, fout=None):
"""
Display a single catalog of given key.

Expand Down
2 changes: 1 addition & 1 deletion astroquery/vo_conesearch/validator/tstquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
__all__ = ['parse_cs']


def parse_cs(ivoid, cap_index=1):
def parse_cs(ivoid, *, cap_index=1):
"""Return test query pars as dict for given IVO ID and capability index."""

# Production server.
Expand Down
4 changes: 2 additions & 2 deletions astroquery/vo_conesearch/validator/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


@timefunc(num_tries=1)
def check_conesearch_sites(destdir=os.curdir, verbose=True, parallel=True,
def check_conesearch_sites(*, destdir=os.curdir, verbose=True, parallel=True,
url_list='default'):
"""
Validate Cone Search Services.
Expand Down Expand Up @@ -155,7 +155,7 @@ def check_conesearch_sites(destdir=os.curdir, verbose=True, parallel=True,
continue

# Use testQuery to return non-empty VO table with max verbosity.
testquery_pars = parse_cs(cur_cat['ivoid'], cur_cat['cap_index'])
testquery_pars = parse_cs(cur_cat['ivoid'], cap_index=cur_cat['cap_index'])
cs_pars_arr = ['{}={}'.format(key, testquery_pars[key])
for key in testquery_pars]
cs_pars_arr += ['VERB=3']
Expand Down
2 changes: 1 addition & 1 deletion astroquery/vo_conesearch/vo_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __getattr__(self, what):
except AttributeError:
return getattr(self.future, what)

def get(self, timeout=None):
def get(self, *, timeout=None):
"""Get result, if available, then shut down thread.

Parameters
Expand Down
12 changes: 6 additions & 6 deletions astroquery/vo_conesearch/vos_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@ def list_catalogs(self, pattern=None, sort=True):
"""
return self._match_pattern(list(self._catalogs), pattern, sort)

def list_catalogs_by_url(self, pattern=None, sort=True):
def list_catalogs_by_url(self, *, pattern=None, sort=True):
"""Like :meth:`list_catalogs` but using access URL."""
out_arr = self._match_pattern(list(self._url_keys), pattern, sort)

# Discard URL that maps to nothing
return [a for a in out_arr if len(self._url_keys[a]) > 0]

def add_catalog(self, name, cat, allow_duplicate_url=False):
def add_catalog(self, name, cat, *, allow_duplicate_url=False):
"""
Add a catalog to database.

Expand Down Expand Up @@ -440,7 +440,7 @@ def merge(self, other, **kwargs):

return db

def to_json(self, filename, overwrite=False):
def to_json(self, filename, *, overwrite=False):
"""
Write database content to a JSON file.

Expand Down Expand Up @@ -527,7 +527,7 @@ def from_json(cls, filename, **kwargs):
return cls(tree)

@classmethod
def from_registry(cls, registry_url, timeout=60, **kwargs):
def from_registry(cls, registry_url, *, timeout=60, **kwargs):
"""
Create a database of VO services from VO registry URL.

Expand Down Expand Up @@ -628,7 +628,7 @@ def from_registry(cls, registry_url, timeout=60, **kwargs):
return db


def get_remote_catalog_db(dbname, cache=True, verbose=True):
def get_remote_catalog_db(dbname, *, cache=True, verbose=True):
"""
Get a database of VO services (which is a JSON file) from a remote
location.
Expand Down Expand Up @@ -700,7 +700,7 @@ def _get_catalogs(service_type, catalog_db, **kwargs):
return catalogs


def _vo_service_request(url, pedantic, kwargs, cache=True, verbose=False):
def _vo_service_request(url, pedantic, kwargs, *, cache=True, verbose=False):
"""
This is called by :func:`call_vo_service`.

Expand Down