Commit d40b7c9f authored by Damien Lespiau's avatar Damien Lespiau

pep8: Make git-pw pass flake8

I silenced yet another warning because I really want to be able to
write:

    'need_git_repo': True,
    'need_project' : False,
    'need_auth'    : False,

and flake8 was complaining about the number of spaces around ':'
Signed-off-by: 's avatarDamien Lespiau <damien.lespiau@intel.com>
parent b4be78b0
......@@ -88,6 +88,7 @@ class HttpError(Exception):
elif self.status_code in msg:
die(msg[self.status_code])
class Command(object):
meta = {
'apply': {
......@@ -145,7 +146,7 @@ class Command(object):
class User(object):
def __init__(self, username, password):
def __init__(self, username, password):
self.username = username
self.password = password
......@@ -307,7 +308,7 @@ class GitPatchwork(object):
def setup(self):
try:
self.repo = git.Repo(os.getcwd())
except git.exc.InvalidGitRepositoryError as e:
except git.exc.InvalidGitRepositoryError:
if self.cmd.need_git_repo:
die('Not a git repository.')
......@@ -338,7 +339,8 @@ class GitPatchwork(object):
except:
die("git-pw isn't configured.\n\n"
"Please set up the patchwork url and project, e.g.:\n\n"
" git config patchwork.%(config)s.url https://patchwork.freedesktop.org\n"
" git config patchwork.%(config)s.url "
"https://patchwork.freedesktop.org\n"
" git config patchwork.%(config)s.project intel-gfx\n" % {
'config': self.cmd.config,
})
......@@ -564,7 +566,8 @@ class AliasedSubParsersAction(argparse._SubParsersAction):
else:
aliases = []
parser = super(AliasedSubParsersAction, self).add_parser(name, **kwargs)
parser = super(AliasedSubParsersAction, self). \
add_parser(name, **kwargs)
# Make the aliases work.
for alias in aliases:
......@@ -578,6 +581,7 @@ class AliasedSubParsersAction(argparse._SubParsersAction):
return parser
def parser_add_result_options(parser):
parser.add_argument('--url', '-u', metavar='url', type=str,
help='the URL where to get full test results')
......
......@@ -3,12 +3,14 @@
script_dir=$(cd `dirname $0`; pwd)
root_dir=`dirname $script_dir`
patchwork=$root_dir/patchwork
gitpw=$root_dir/git-pw
files=$(cat <<-END
$patchwork/bin/parsemail.py
$patchwork/admin.py
$patchwork/tests/test_rest.py
$patchwork/views/xmlrpc.py
$gitpw/git-pw
END
)
......
......@@ -27,7 +27,7 @@ deps = flake
commands = flake8 {posargs:patchwork}
[flake8]
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E203,E251,H405
exclude = ./patchwork/tests
[testenv:lint]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment