Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 595ebe4

Browse files
committed
ingest_mdir: break lines to make pylint happy
Break up long lines. Pure refactor, no functional changes intended. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b24e151 commit 595ebe4

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

ingest_mdir.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
config = configparser.ConfigParser()
2626
config.read(['nipa.config', "tester.config"])
2727

28-
results_dir = config.get('results', 'dir', fallback=os.path.join(NIPA_DIR, "results"))
28+
results_dir = config.get('results', 'dir',
29+
fallback=os.path.join(NIPA_DIR, "results"))
2930

3031
# TODO: use config
3132
parser = argparse.ArgumentParser()
32-
parser.add_argument('--mdir', required=True, help='path to the directory with the patches')
33+
parser.add_argument('--mdir', required=True,
34+
help='path to the directory with the patches')
3335
parser.add_argument('--tree', required=True, help='path to the tree to test on')
34-
parser.add_argument('--tree-name', default='unknown', help='the tree name to expect')
36+
parser.add_argument('--tree-name', default='unknown',
37+
help='the tree name to expect')
3538
parser.add_argument('--tree-branch', default='main',
3639
help='the branch or commit to use as a base for applying patches')
3740
parser.add_argument('--result-dir', default=results_dir,
@@ -41,7 +44,8 @@
4144
args.mdir = os.path.abspath(args.mdir)
4245
args.tree = os.path.abspath(args.tree)
4346

44-
log_init(config.get('log', 'type'), config.get('log', 'path'), force_single_thread=True)
47+
log_init(config.get('log', 'type'), config.get('log', 'path'),
48+
force_single_thread=True)
4549

4650
log_open_sec("Loading patches")
4751
try:
@@ -81,5 +85,8 @@
8185
tester.join()
8286

8387
# Summary hack
84-
os.system(f'for i in $(find {args.result_dir} -type f -name summary); do dir=$(dirname "$i"); head -n2 "$dir"/summary; cat "$dir"/desc 2>/dev/null; done'
85-
)
88+
os.system(f'for i in $(find {args.result_dir} -type f -name summary); do ' +
89+
'dir=$(dirname "$i"); ' +
90+
'head -n2 "$dir"/summary; ' +
91+
'cat "$dir"/desc 2>/dev/null; done'
92+
)

0 commit comments

Comments
 (0)