diff options
| author | Cody Logan <cody@lokken.dev> | 2023-12-01 15:33:21 -0800 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-12-01 15:33:21 -0800 |
| commit | 318d9ad1a4679832b380c77ab1a0a86684f686f2 (patch) | |
| tree | ee1bd8ad347c18b3fc44da388360634c3afd231c /src/wikiget/client.py | |
| parent | 488e859f8c343b0ef25db379b6339bf82769514b (diff) | |
| download | wikiget-318d9ad1a4679832b380c77ab1a0a86684f686f2.tar.gz wikiget-318d9ad1a4679832b380c77ab1a0a86684f686f2.zip | |
Switch to Google-style docstrings for readability
The previous Sphinx-style docstrings could be hard to read at a
glance when formatted with pydoc.
Diffstat (limited to 'src/wikiget/client.py')
| -rw-r--r-- | src/wikiget/client.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/wikiget/client.py b/src/wikiget/client.py index 2729144..a924f79 100644 --- a/src/wikiget/client.py +++ b/src/wikiget/client.py @@ -38,12 +38,12 @@ logger = logging.getLogger(__name__) def connect_to_site(site_name: str, args: Namespace) -> Site: """Create and return a Site object using the given site name and CLI arguments. - :param site_name: hostname of the site to connect to - :type site_name: str - :param args: command-line arguments and their values - :type args: argparse.Namespace - :return: a new Site object - :rtype: mwclient.Site + Args: + site_name (str): hostname of the site to connect to + args (argparse.Namespace): command-line arguments and their values + + Returns: + mwclient.Site: a new Site object """ logger.info("Connecting to %s", site_name) @@ -82,12 +82,12 @@ def query_api(filename: str, site: Site) -> Image: Even if there's no file by that name on the site, an Image will still be returned, though with an empty imageinfo attribute. - :param filename: name of the file to retrieve - :type filename: str - :param site: the Site object to query - :type site: mwclient.Site - :return: an Image object representing the requested file - :rtype: mwclient.image.Image + Args: + filename (str): name of the file to retrieve + site (mwclient.Site): the Site object to query + + Returns: + mwclient.image.Image: an Image object representing the requested file """ try: # get info about the target file |
