Skip to content

Commit

Permalink
update doc strings for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
barrust committed Jul 28, 2023
1 parent 72899cd commit 86c4080
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mediawiki/mediawiki.py
Expand Up @@ -43,7 +43,8 @@ class MediaWiki(object):
library's default user-agent string
username (str): The username to use to log into the MediaWiki
password (str): The password to use to log into the MediaWiki
proxies (str): A dictionary of specific proxies to use in the Requests libary."""
proxies (str): A dictionary of specific proxies to use in the Requests libary
verify_ssl (bool|str): Verify SSL Certificates to be passed directly into the Requests library"""

__slots__ = [
"_version",
Expand Down Expand Up @@ -582,6 +583,8 @@ def geosearch(
list: A listing of page titles
Note:
The Geosearch API does not support pulling more than the maximum of 500
Note:
If the page doesn't match the provided title, try setting auto_suggest to `False`
Raises:
ValueError: If either the passed latitude or longitude are not coercible to a Decimal
"""
Expand Down Expand Up @@ -706,7 +709,9 @@ def summary(self, title, sentences=0, chars=0, auto_suggest=True, redirect=True)
str: The summarized results of the page
Note:
Precedence for parameters: sentences then chars; if both are \
0 then the entire first section is returned """
0 then the entire first section is returned
Note:
If the page doesn't match the provided title, try setting auto_suggest to `False`"""
page_info = self.page(title, auto_suggest=auto_suggest, redirect=redirect)
return page_info.summarize(sentences, chars)

Expand Down Expand Up @@ -828,7 +833,9 @@ def page(self, title=None, pageid=None, auto_suggest=True, redirect=True, preloa
Raises:
:py:func:`mediawiki.exceptions.PageError`: if page does not exist
Note:
Title takes precedence over pageid if both are provided """
Title takes precedence over pageid if both are provided
Note:
If the page doesn't match the provided title, try setting auto_suggest to `False`"""
if (title is None or title.strip() == "") and pageid is None:
raise ValueError("Either a title or a pageid must be specified")
if title:
Expand Down

0 comments on commit 86c4080

Please sign in to comment.