Fix flake8-docstrings D200 One-line docstring should fit on one line with quotes

This commit is contained in:
Labrys of Knossos 2019-04-05 14:45:48 -04:00
commit 4dd58afaf6
3 changed files with 5 additions and 15 deletions

View file

@ -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 []

View file

@ -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')

View file

@ -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')