diff --git a/core/github_api.py b/core/github_api.py index 6e44f9f3..b6fb0856 100644 --- a/core/github_api.py +++ b/core/github_api.py @@ -4,9 +4,7 @@ import requests class GitHub(object): - """ - Simple api wrapper for the Github API v3. - """ + """Simple api wrapper for the Github API v3.""" def __init__(self, github_repo_user, github_repo, branch='master'): @@ -15,9 +13,7 @@ class GitHub(object): self.branch = branch def _access_api(self, path, params=None): - """ - Access the API at the path given and with the optional params given. - """ + """Access API at given an API path and optional parameters.""" url = 'https://api.github.com/{path}'.format(path='/'.join(path)) data = requests.get(url, params=params, verify=False) return data.json() if data.ok else [] diff --git a/core/logger.py b/core/logger.py index f7fbf9c4..701881cf 100644 --- a/core/logger.py +++ b/core/logger.py @@ -111,9 +111,7 @@ class NTMRotatingLogHandler(object): self.close_log(old_handler) def _config_handler(self): - """ - Configure a file handler to log at file_name and return it. - """ + """Configure a file handler to log at file_name and return it.""" file_handler = logging.FileHandler(self.log_file_path, encoding='utf-8') diff --git a/core/version_check.py b/core/version_check.py index d865b9f3..b39a8b08 100644 --- a/core/version_check.py +++ b/core/version_check.py @@ -19,9 +19,7 @@ from core import github_api as github, logger class CheckVersion(object): - """ - Version check class meant to run as a thread object with the SB scheduler. - """ + """Version checker that runs in a thread with the SB scheduler.""" def __init__(self): self.install_type = self.find_install_type() @@ -435,9 +433,7 @@ class SourceUpdateManager(UpdateManager): return def update(self): - """ - Downloads the latest source tarball from github and installs it over the existing version. - """ + """Download and install latest source tarball from github.""" tar_download_url = 'https://github.com/{org}/{repo}/tarball/{branch}'.format( org=self.github_repo_user, repo=self.github_repo, branch=self.branch) version_path = os.path.join(core.APP_ROOT, u'version.txt')