mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Fix flake8-docstrings D200 One-line docstring should fit on one line with quotes
This commit is contained in:
parent
a8043d0259
commit
4dd58afaf6
3 changed files with 5 additions and 15 deletions
|
@ -4,9 +4,7 @@ import requests
|
||||||
|
|
||||||
|
|
||||||
class GitHub(object):
|
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'):
|
def __init__(self, github_repo_user, github_repo, branch='master'):
|
||||||
|
|
||||||
|
@ -15,9 +13,7 @@ class GitHub(object):
|
||||||
self.branch = branch
|
self.branch = branch
|
||||||
|
|
||||||
def _access_api(self, path, params=None):
|
def _access_api(self, path, params=None):
|
||||||
"""
|
"""Access API at given an API path and optional parameters."""
|
||||||
Access the API at the path given and with the optional params given.
|
|
||||||
"""
|
|
||||||
url = 'https://api.github.com/{path}'.format(path='/'.join(path))
|
url = 'https://api.github.com/{path}'.format(path='/'.join(path))
|
||||||
data = requests.get(url, params=params, verify=False)
|
data = requests.get(url, params=params, verify=False)
|
||||||
return data.json() if data.ok else []
|
return data.json() if data.ok else []
|
||||||
|
|
|
@ -111,9 +111,7 @@ class NTMRotatingLogHandler(object):
|
||||||
self.close_log(old_handler)
|
self.close_log(old_handler)
|
||||||
|
|
||||||
def _config_handler(self):
|
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')
|
file_handler = logging.FileHandler(self.log_file_path, encoding='utf-8')
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,7 @@ from core import github_api as github, logger
|
||||||
|
|
||||||
|
|
||||||
class CheckVersion(object):
|
class CheckVersion(object):
|
||||||
"""
|
"""Version checker that runs in a thread with the SB scheduler."""
|
||||||
Version check class meant to run as a thread object with the SB scheduler.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.install_type = self.find_install_type()
|
self.install_type = self.find_install_type()
|
||||||
|
@ -435,9 +433,7 @@ class SourceUpdateManager(UpdateManager):
|
||||||
return
|
return
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""
|
"""Download and install latest source tarball from github."""
|
||||||
Downloads the latest source tarball from github and installs it over the existing version.
|
|
||||||
"""
|
|
||||||
tar_download_url = 'https://github.com/{org}/{repo}/tarball/{branch}'.format(
|
tar_download_url = 'https://github.com/{org}/{repo}/tarball/{branch}'.format(
|
||||||
org=self.github_repo_user, repo=self.github_repo, branch=self.branch)
|
org=self.github_repo_user, repo=self.github_repo, branch=self.branch)
|
||||||
version_path = os.path.join(core.APP_ROOT, u'version.txt')
|
version_path = os.path.join(core.APP_ROOT, u'version.txt')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue