Skip to content

Commit 505f364

Browse files
committed
fix flake8 lints
1 parent 147827a commit 505f364

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

homu/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def start_testing(self, timeout):
346346
self.set_status('pending')
347347

348348
wm = weakref.WeakMethod(self.timed_out)
349+
349350
def timed_out():
350351
m = wm()
351352
if m:
@@ -874,12 +875,12 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg,
874875
'You may also read'
875876
' [*Git Rebasing to Resolve Conflicts* by Drew Blessing](http://blessing.io/git/git-rebase/open-source/2015/08/23/git-rebasing-to-resolve-conflicts.html)' # noqa
876877
' for a short tutorial.\n\n'
877-
'Please avoid the ["**Resolve conflicts**" button](https://help.github.com/articles/resolving-a-merge-conflict-on-github/) on GitHub.' #noqa
878-
' It uses `git merge` instead of `git rebase` which makes the PR commit'
878+
'Please avoid the ["**Resolve conflicts**" button](https://help.github.com/articles/resolving-a-merge-conflict-on-github/) on GitHub.' # noqa
879+
' It uses `git merge` instead of `git rebase` which makes the PR commit' # noqa
879880
' history more difficult to read.\n\n'
880881
'Sometimes step 4 will complete without asking for resolution. This is'
881882
' usually due to difference between how `Cargo.lock` conflict is'
882-
' handled during merge and rebase. This is normal, and you should still'
883+
' handled during merge and rebase. This is normal, and you should still' # noqa
883884
' perform step 5 to update this PR.\n\n'
884885
'</details>\n\n'
885886
).format(branch=state.head_ref.split(':', 1)[1])
@@ -974,7 +975,7 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg,
974975
stderr=subprocess.STDOUT,
975976
universal_newlines=True)
976977
except subprocess.CalledProcessError as e:
977-
comment += '<details><summary>Error message</summary>\n\n```text\n'
978+
comment += '<details><summary>Error message</summary>\n\n```text\n' # noqa
978979
comment += e.output
979980
comment += '\n```\n\n</details>'
980981
pass

homu/server.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ def callback():
196196
logger.warn('/callback encountered an error '
197197
'during github oauth callback')
198198
# probably related to https://gitlab.com/pycqa/flake8/issues/42
199-
lazy_debug(logger, lambda: 'github oauth callback err: {}'.format(ex)) # noqa
199+
lazy_debug(
200+
logger,
201+
lambda ex=ex: 'github oauth callback err: {}'.format(ex),
202+
)
200203
abort(502, 'Bad Gateway')
201204

202205
args = urllib.parse.parse_qs(res.text)
@@ -653,9 +656,10 @@ def buildbot():
653656
except Exception as ex:
654657
logger.warn('/buildbot encountered an error during '
655658
'github logs request')
656-
# probably related to
657-
# https://gitlab.com/pycqa/flake8/issues/42
658-
lazy_debug(logger, lambda: 'buildbot logs err: {}'.format(ex)) # noqa
659+
lazy_debug(
660+
logger,
661+
lambda ex=ex: 'buildbot logs err: {}'.format(ex),
662+
)
659663
abort(502, 'Bad Gateway')
660664

661665
mat = INTERRUPTED_BY_HOMU_RE.search(res.text)

0 commit comments

Comments
 (0)