diff options
| author | Cody Logan <cody@lokken.dev> | 2023-11-14 16:56:15 -0800 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-11-14 16:56:15 -0800 |
| commit | c459e3bb9553e31224348b055aaaec3a567613bb (patch) | |
| tree | 9a518ed22ba9f1529b4acbd42170d6bb878f95e7 | |
| parent | 605085c95fe5ab6af337aefc723794f78cf3dfd7 (diff) | |
| download | wikiget-c459e3bb9553e31224348b055aaaec3a567613bb.tar.gz wikiget-c459e3bb9553e31224348b055aaaec3a567613bb.zip | |
Docstring type fixes
| -rw-r--r-- | src/wikiget/dl.py | 4 | ||||
| -rw-r--r-- | src/wikiget/file.py | 2 | ||||
| -rw-r--r-- | src/wikiget/parse.py | 2 | ||||
| -rw-r--r-- | tests/test_parse.py | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/wikiget/dl.py b/src/wikiget/dl.py index abd0533..9b2777f 100644 --- a/src/wikiget/dl.py +++ b/src/wikiget/dl.py @@ -49,7 +49,7 @@ def prep_download(dl: str, args: Namespace) -> File: :type args: argparse.Namespace :raises FileExistsError: the destination file already exists on disk :return: a File object representing the file to download - :rtype: File + :rtype: wikiget.file.File """ file = get_dest(dl, args) @@ -169,7 +169,7 @@ def download(f: File, args: Namespace) -> int: """Fetch file information and contents if the file exists and save it to disk. :param f: a File object representing the file to be downloaded - :type f: File + :type f: wikiget.file.File :param args: command-line arguments and their values :type args: argparse.Namespace :return: number of errors encountered during processing diff --git a/src/wikiget/file.py b/src/wikiget/file.py index f2320b2..cbd738a 100644 --- a/src/wikiget/file.py +++ b/src/wikiget/file.py @@ -54,7 +54,7 @@ class File: """Compare this File object with another for equality. :param other: another File to compare - :type other: File + :type other: wikiget.file.File :return: True if the Files are equal and False otherwise :rtype: bool """ diff --git a/src/wikiget/parse.py b/src/wikiget/parse.py index 92726f0..1deaacf 100644 --- a/src/wikiget/parse.py +++ b/src/wikiget/parse.py @@ -42,7 +42,7 @@ def get_dest(dl: str, args: Namespace) -> File: :type args: argparse.Namespace :raises ParseError: the target was unable to be parsed as a valid file :return: a File object representing the target, destination, and site - :rtype: File + :rtype: wikiget.file.File """ url = urlparse(dl) diff --git a/tests/test_parse.py b/tests/test_parse.py index 4f74ac9..fb824d4 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -46,7 +46,7 @@ class TestGetDest: to the same value as the filename and the default site will be used. :return: a File object created using a filename - :rtype: File + :rtype: wikiget.file.File """ args = parse_args(["File:Example.jpg"]) return get_dest(args.FILE, args) @@ -77,7 +77,7 @@ class TestGetDest: filename and site parsed from the URL. :return: a File object created using a URL - :rtype: File + :rtype: wikiget.file.File """ args = parse_args(["https://en.wikipedia.org/wiki/File:Example.jpg"]) return get_dest(args.FILE, args) @@ -130,7 +130,7 @@ class TestReadBatchFile: """Create and process a test batch file with three lines. :param batch_file: test batch file - :type batch_file: Path + :type batch_file: pathlib.Path :return: dictionary representation of the input file :rtype: dict[int, str] """ @@ -207,7 +207,7 @@ class TestReadBatchFile: In addition to filenames, one line is commented out and another line is blank. :param batch_file_with_comment: test batch file - :type batch_file_with_comment: Path + :type batch_file_with_comment: pathlib.Path :return: dictionary representation of the input file :rtype: dict[int, str] """ |
