From b4404e44765342517233d20e8feb85e5932fadb0 Mon Sep 17 00:00:00 2001 From: yonishelach Date: Wed, 7 Jun 2023 14:55:44 +0300 Subject: [PATCH] :return: -> :returns --- src/data_collection.py | 4 ++-- src/data_preprocess.py | 4 ++-- src/project_setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data_collection.py b/src/data_collection.py index a39934b..b47f554 100644 --- a/src/data_collection.py +++ b/src/data_collection.py @@ -181,7 +181,7 @@ def get_html_as_string(url: str, mark_headers: bool) -> str: :param url: html URL :param mark_headers: Whether to add article and header prefixes to headers to text - :return: html text content + :returns: html text content """ # read html source: req = Request(url=url, headers={"User-Agent": "Mozilla/5.0"}) @@ -200,7 +200,7 @@ def collect_html_to_text_files(urls, mark_headers=True) -> str: :param urls: html URLs :param mark_headers: Whether to add article and header prefixes to headers to text - :return: the directory name that contains all the content text files. + :returns: the directory name that contains all the content text files. """ directory = "html_as_text_files" os.makedirs(directory, exist_ok=True) diff --git a/src/data_preprocess.py b/src/data_preprocess.py index 2e6d08c..2a6dafe 100644 --- a/src/data_preprocess.py +++ b/src/data_preprocess.py @@ -21,7 +21,7 @@ def convert_textfile_to_data_with_prompts(txt_file: Path): Each header-content in the article is an element in the generated list of prompts :param txt_file: text content as a string with tokens of headers. - :return: list of prompts + :returns: list of prompts """ # Read file: with open(txt_file, "r") as f: @@ -69,7 +69,7 @@ def prepare_dataset(source_dir: str): :param source_dir: the directory that contains all the text files. - :return: A dataset with all the prompts inside + :returns: A dataset with all the prompts inside """ with zipfile.ZipFile(source_dir, "r") as zip_file: tmp_dir = tempfile.mkdtemp() diff --git a/src/project_setup.py b/src/project_setup.py index 087ff0d..ce57bd1 100644 --- a/src/project_setup.py +++ b/src/project_setup.py @@ -38,7 +38,7 @@ def create_and_set_project( :param num_cpus_per_replica: number of CPUs per worker :param memory_per_replica: amount of memory per worker - :return: a fully prepared project for this demo. + :returns: a fully prepared project for this demo. """ # Get / Create a project from the MLRun DB: project = mlrun.get_or_create_project(