Fix hacking 0.10 errors in shotgun

Change-Id: I6db506606b978850cfda016573a4dec286f29e95
Partial-Bug: #1410810
This commit is contained in:
Maciej Kwiek 2015-10-08 16:49:37 +02:00
parent 4c50b7025b
commit db737cb943
5 changed files with 18 additions and 10 deletions

View File

@ -67,6 +67,5 @@ def make_snapshot(args):
def main():
"""Entry point
"""
"""Entry point"""
make_snapshot(parse_args())

View File

@ -106,7 +106,9 @@ class Driver(object):
return out
def get(self, path, target_path):
"""target_path must be the directory where to put
"""Get remote or local file
target_path must be the directory where to put
copied files or directories
"""
try:
@ -150,7 +152,9 @@ class File(Driver):
logger.debug("File to save: %s", self.target_path)
def snapshot(self):
"""Example:
"""Make a snapshot
Example:
self.conf.target IS /target
self.host IS host.domain.tld
self.path IS /var/log/somedir
@ -200,7 +204,9 @@ class Subs(File):
sedscript.close()
def snapshot(self):
"""Example:
"""Make a snapshot
Example:
self.conf.target IS /target
self.host IS host.domain.tld
self.path IS /var/log/somedir (it can be /var/log/somedir*)

View File

@ -18,8 +18,7 @@ from shotgun.settings import LOG_FILE
def configure_logger():
"""Configures shotgun logger
"""
"""Configures shotgun logger"""
logger = logging.getLogger('shotgun')
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(

View File

@ -52,7 +52,8 @@ def iterfiles(path):
def remove(full_dst_path, excludes):
"""Removes subdirs/files using unixs syntax.
"""Removes subdirs/files using unixs syntax
full_dst_path is treated as root directory for remove
:param full_dst_path: str
@ -66,6 +67,7 @@ def remove(full_dst_path, excludes):
def compress(target, level, keep_target=False):
"""Runs compression of provided directory
:param target: directory to compress
:param level: level of compression
:param keep_target: bool, if True target directory wont be removed
@ -126,7 +128,9 @@ class CCStringIO(StringIO):
"""
def __init__(self, buffer='', writers=None):
"""If ``writers`` is given and is a file-like object or an
"""CCStringIO initializator
If ``writers`` is given and is a file-like object or an
iterable of same, it/they will be written to whenever this
StringIO instance is written to.
"""

View File

@ -15,7 +15,7 @@ commands =
downloadcache = ~/cache/pip
[testenv:pep8]
deps = hacking==0.7
deps = hacking==0.10
usedevelop = False
commands =
flake8 {posargs:shotgun}