diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-12-11 17:31:41 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-12-11 17:31:41 -0500 |
commit | 7878acce470f52639350c820442f55910dcda86e (patch) | |
tree | 49632108c4e5a7d950ad30b7668841fbd1838892 | |
parent | d5a8ae0f634af2cf6002b65a008c24d0655ca736 (diff) | |
download | b4-7878acce470f52639350c820442f55910dcda86e.tar.gz |
More cosmetic whitespace fixes
Further appease the over-critical syntax analysis tooling.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/command.py | 4 | ||||
-rw-r--r-- | b4/ez.py | 2 | ||||
-rw-r--r-- | b4/kr.py | 1 | ||||
-rw-r--r-- | b4/mbox.py | 2 | ||||
-rw-r--r-- | b4/pr.py | 1 | ||||
-rw-r--r-- | b4/ty.py | 4 |
6 files changed, 8 insertions, 6 deletions
diff --git a/b4/command.py b/b4/command.py index b318afe..091fbf5 100644 --- a/b4/command.py +++ b/b4/command.py @@ -291,7 +291,8 @@ def setup_parser() -> argparse.ArgumentParser: help='When creating a new branch, use this thread') ag_prepe = sp_prep.add_argument_group('Enroll existing branch', 'Enroll existing branch for prep work') ag_prepe.add_argument('-e', '--enroll', dest='enroll_base', nargs='?', const='@{upstream}', - help='Enroll current branch, using its configured upstream branch as fork base, or the passed tag, branch, or commit') + help='Enroll current branch, using its configured upstream branch as fork base, ' + 'or the passed tag, branch, or commit') sp_prep.set_defaults(func=cmd_prep) # b4 trailers @@ -367,6 +368,7 @@ def cmd(): if __name__ == '__main__': # We're running from a checkout, so reflect git commit in the version import os + # noinspection PyBroadException try: if b4.__VERSION__.find('-dev') > 0: @@ -32,12 +32,14 @@ from string import Template try: import patatt + can_patatt = True except ModuleNotFoundError: can_patatt = False try: import git_filter_repo as fr # noqa + can_gfr = True except ModuleNotFoundError: can_gfr = False @@ -13,7 +13,6 @@ import re import b4 import b4.mbox - logger = b4.logger @@ -99,7 +99,7 @@ def make_am(msgs: List[email.message.Message], cmdargs: argparse.Namespace, msgi logger.critical('Could not match "%s" to any subjects in the series', cmdargs.cherrypick) sys.exit(1) else: - cherrypick = list(b4.parse_int_range(cmdargs.cherrypick, upper=len(lser.patches)-1)) + cherrypick = list(b4.parse_int_range(cmdargs.cherrypick, upper=len(lser.patches) - 1)) else: cherrypick = None @@ -22,7 +22,6 @@ from datetime import datetime from email import utils, charset from typing import Optional, List - charset.add_charset('utf-8', None) logger = b4.logger @@ -317,10 +317,10 @@ def generate_am_thanks(gitdir, jsondata, branch, since): patches = jsondata['patches'] for at, cid in commits: try: - prefix = '[%s] ' % patches[at-1][3] + prefix = '[%s] ' % patches[at - 1][3] except IndexError: prefix = '[%s/%s] ' % (str(at).zfill(padlen), len(commits)) - slines.append('%s%s' % (prefix, patches[at-1][0])) + slines.append('%s%s' % (prefix, str(patches[at - 1][0]))) if cid is None: slines.append('%s(no commit info)' % (' ' * len(prefix))) nomatch += 1 |