Skip to content

Commit

Permalink
Fix lint (#1529)
Browse files Browse the repository at this point in the history
This PR fixes new lint errors from the latest `pylint`, which is
required as #1526 upgrades `Python` to `3.10`.
I reckon I have fixed all meaningful errors in the *`FuzzBench`
framework*, not sure if the rest is worth fixing or could be ignored.
  • Loading branch information
DonggeLiu authored Nov 24, 2022
1 parent 9e67151 commit 2ba4957
Show file tree
Hide file tree
Showing 111 changed files with 2,929 additions and 1,019 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test_run_fuzzer_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def make_builds(benchmarks, fuzzer):
# Sort benchmarks so that they get built in a deterministic order.
fuzzer_benchmark_pairs = sorted(fuzzer_benchmark_pairs,
key=lambda pair: pair[1])
print('Building fuzzer-benchmark pairs: {}'.format(fuzzer_benchmark_pairs))
print(f'Building fuzzer-benchmark pairs: {fuzzer_benchmark_pairs}')
for _, benchmark in fuzzer_benchmark_pairs:
make_target = get_make_target(fuzzer, benchmark)
make_command = ['make', 'RUNNING_ON_CI=yes', '-j', make_target]
Expand All @@ -116,7 +116,7 @@ def do_build(build_type, fuzzer, always_build):
elif build_type == 'bug':
benchmarks = benchmark_utils.get_bug_benchmarks()
else:
raise Exception('Invalid build_type: %s' % build_type)
raise Exception(f'Invalid build_type: {build_type}')

if always_build:
# Always do a build if always_build is True.
Expand All @@ -138,7 +138,7 @@ def do_build(build_type, fuzzer, always_build):
def main():
"""Build OSS-Fuzz or standard benchmarks with a fuzzer."""
if len(sys.argv) != 3:
print('Usage: %s <build_type> <fuzzer>' % sys.argv[0])
print(f'Usage: {sys.argv[0]} <build_type> <fuzzer>')
return 1
build_type = sys.argv[1]
fuzzer = sys.argv[2]
Expand Down
Loading

0 comments on commit 2ba4957

Please sign in to comment.