Skip to content

Commit c868716

Browse files
authored
Merge pull request #577 from astropy/docs-edit-freetext-constraint
Documentation of Freetext constraint
2 parents 78dff31 + 1c85510 commit c868716

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

pyvo/registry/rtcons.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def get_search_condition(self, service):
241241

242242
class Freetext(Constraint):
243243
"""
244-
A contraint using plain text to match against title, description,
244+
A constraint using plain text to match against title, description,
245245
subjects, and person names.
246246
"""
247247
_keyword = "keywords"
@@ -251,11 +251,17 @@ def __init__(self, *words: str):
251251
252252
Parameters
253253
----------
254-
*words : tuple of str
254+
*words : str
255+
One or more string arguments.
255256
It is recommended to pass multiple words in multiple strings
256257
arguments. You can pass in phrases (i.e., multiple words
257258
separated by space), but behaviour might then vary quite
258259
significantly between different registries.
260+
261+
Examples
262+
--------
263+
>>> from pyvo import registry
264+
>>> registry.Freetext("Gamma", "Ray", "Burst") # doctest: +IGNORE_OUTPUT
259265
"""
260266
self.words = words
261267

@@ -387,7 +393,7 @@ def __init__(self, *stds):
387393
388394
Parameters
389395
----------
390-
*stds : tuple of str
396+
*stds : str
391397
one or more standards identifiers. The constraint will
392398
match records that have any of them.
393399
"""
@@ -462,7 +468,7 @@ def __init__(self, *bands):
462468
463469
Parameters
464470
----------
465-
*bands : tuple of strings
471+
*bands : strings
466472
One or more of the terms given in http://www.ivoa.net/rdf/messenger.
467473
The constraint matches when a resource declares at least
468474
one of the messengers listed.
@@ -559,6 +565,7 @@ def __init__(self, ivoid, *more_ivoids):
559565
----------
560566
561567
ivoid : string
568+
One or more string arguments.
562569
The IVOA identifier of the resource to match. As RegTAP
563570
requires lowercasing ivoids on ingestion, the constraint
564571
lowercases the ivoid passed in, too.
@@ -588,7 +595,7 @@ def __init__(self, *patterns):
588595
Parameters
589596
----------
590597
591-
patterns : tuple of strings
598+
patterns : strings
592599
SQL patterns (i.e., ``%`` is 0 or more characters) for
593600
UCDs. The constraint will match when a resource has
594601
at least one column matching one of the patterns.

0 commit comments

Comments
 (0)