From f4f4cfe294fd3ba4bb41ebbd8eebebf4c992f1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 1 Jun 2022 20:19:12 +0200 Subject: [PATCH 1/3] CI: Print pylint version before running checks --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 262f15dc0..b637b5805 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -700,6 +700,7 @@ jobs: deepdiff colorama requests + - run: pylint --version - run: name: Linting Python Scripts command: ./scripts/pylint_all.py From 6605dd084ac07048139e7d6976bda1ffb7005733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 1 Jun 2022 20:20:54 +0200 Subject: [PATCH 2/3] gas_diff_stats.py: Replace a list with a generator as suggested by pylint --- scripts/gas_diff_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gas_diff_stats.py b/scripts/gas_diff_stats.py index 5c7aa5338..56cd0cd43 100644 --- a/scripts/gas_diff_stats.py +++ b/scripts/gas_diff_stats.py @@ -88,11 +88,11 @@ def collect_statistics(lines) -> (int, int, int, int, int, int): diff_kinds = [Diff.Minus, Diff.Plus] codegen_kinds = [Kind.IrOptimized, Kind.LegacyOptimized, Kind.Legacy] return tuple( - sum([ + sum( val for (diff_kind, codegen_kind, val) in out if diff_kind == _diff_kind and codegen_kind == _codegen_kind - ]) + ) for _diff_kind in diff_kinds for _codegen_kind in codegen_kinds ) From f5e421ff9125a30105c9ca25948c988aed2d04e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 1 Jun 2022 20:32:13 +0200 Subject: [PATCH 3/3] pylintrc: Remove bad-whitespace form the list of disabled warnings - pylint complains that it's not a valid value and removing it does not make any new warnings appear --- scripts/pylintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/pylintrc b/scripts/pylintrc index 02d529567..3a2b85293 100644 --- a/scripts/pylintrc +++ b/scripts/pylintrc @@ -17,7 +17,6 @@ # TODO: What could be eliminated in future PRs: invalid-name, pointless-string-statement, redefined-outer-name. disable= bad-indentation, - bad-whitespace, duplicate-code, invalid-name, missing-docstring,