From 10b2eab3c571b42fef29b3f5531a23375f980075 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 5 Apr 2019 15:20:23 -0400 Subject: [PATCH] Fix flake8-docstrings D401 First line should be in imperative mood --- core/github_api.py | 4 ++-- core/logger.py | 4 ++-- core/utils/naming.py | 2 +- core/utils/paths.py | 2 +- core/version_check.py | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/github_api.py b/core/github_api.py index b6fb0856..b1a4f566 100644 --- a/core/github_api.py +++ b/core/github_api.py @@ -20,7 +20,7 @@ class GitHub(object): def commits(self): """ - Uses the API to get a list of the 100 most recent commits from the specified user/repo/branch, starting from HEAD. + Get the 100 most recent commits from the specified user/repo/branch, starting from HEAD. user: The github username of the person whose repo you're querying repo: The repo name to query @@ -35,7 +35,7 @@ class GitHub(object): def compare(self, base, head, per_page=1): """ - Uses the API to get a list of compares between base and head. + Get compares between base and head. user: The github username of the person whose repo you're querying repo: The repo name to query diff --git a/core/logger.py b/core/logger.py index dba98947..df5a5120 100644 --- a/core/logger.py +++ b/core/logger.py @@ -127,7 +127,7 @@ class NTMRotatingLogHandler(object): def _log_file_name(self, i): """ - Returns a numbered log file name depending on i. + Return a numbered log file name depending on i. If i==0 it just uses logName, if not it appends it to the extension e.g. (blah.log.3 for i == 3) @@ -138,7 +138,7 @@ class NTMRotatingLogHandler(object): def _num_logs(self): """ - Scans the log folder and figures out how many log files there are already on disk. + Scan the log folder and figure out how many log files there are already on disk. Returns: The number of the last used file (eg. mylog.log.3 would return 3). If there are no logs it returns -1 """ diff --git a/core/utils/naming.py b/core/utils/naming.py index 964fb6fd..64cd6d70 100644 --- a/core/utils/naming.py +++ b/core/utils/naming.py @@ -29,7 +29,7 @@ def sanitize_name(name): def clean_file_name(filename): """ - Cleans up nzb name by removing any . and _ characters and trailing hyphens. + Clean up nzb name by removing any . and _ characters and trailing hyphens. Is basically equivalent to replacing all _ and . with a space, but handles decimal numbers in string, for example: diff --git a/core/utils/paths.py b/core/utils/paths.py index cdb2c3ff..a2a96996 100644 --- a/core/utils/paths.py +++ b/core/utils/paths.py @@ -74,7 +74,7 @@ def get_dir_size(input_path): def remove_empty_folders(path, remove_root=True): - """Function to remove empty folders.""" + """Remove empty folders.""" if not os.path.isdir(path): return diff --git a/core/version_check.py b/core/version_check.py index ac7fdd6d..23384a44 100644 --- a/core/version_check.py +++ b/core/version_check.py @@ -38,7 +38,7 @@ class CheckVersion(object): def find_install_type(self): """ - Determines how this copy of SB was installed. + Determine how this copy of SB was installed. returns: type of installation. Possible values are: 'win': any compiled windows build @@ -55,7 +55,7 @@ class CheckVersion(object): def check_for_new_version(self, force=False): """ - Checks the internet for a newer version. + Check the internet for a newer version. returns: bool, True for new version or False for no new version. @@ -207,7 +207,7 @@ class GitUpdateManager(UpdateManager): def _find_installed_version(self): """ - Attempts to find the currently installed version of Sick Beard. + Attempt to find the currently installed version of Sick Beard. Uses git show to get commit version.