From 21a9144d0d25647f49ee7990b69ceef9dca9230a Mon Sep 17 00:00:00 2001 From: David Bieber Date: Thu, 19 Sep 2024 18:50:15 -0700 Subject: [PATCH] Upgrade pylint --- .github/scripts/requirements.txt | 2 +- fire/core.py | 1 + fire/test_components.py | 3 +-- pylintrc | 19 ++----------------- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt index b9cd377e..f61626de 100644 --- a/.github/scripts/requirements.txt +++ b/.github/scripts/requirements.txt @@ -1,6 +1,6 @@ setuptools <=75.1.0 pip -pylint <2.15.10 +pylint <3.2.8 pytest <=8.3.3 pytest-pylint <=1.1.2 pytest-runner <7.0.0 diff --git a/fire/core.py b/fire/core.py index c61a8b57..bce9b641 100644 --- a/fire/core.py +++ b/fire/core.py @@ -872,6 +872,7 @@ def _ParseKeywordArgs(args, fn_spec): key, value = stripped_argument.split('=', 1) else: key = stripped_argument + value = None # value will be set later on. key = key.replace('-', '_') is_bool_syntax = (not contains_equals and diff --git a/fire/test_components.py b/fire/test_components.py index 540a9e16..eb3a9e24 100644 --- a/fire/test_components.py +++ b/fire/test_components.py @@ -388,8 +388,7 @@ def example_generator(n): [0, 1, 2, 3] """ - for i in range(n): - yield i + yield from range(n) def simple_set(): diff --git a/pylintrc b/pylintrc index 558d3ba2..3d36dae3 100644 --- a/pylintrc +++ b/pylintrc @@ -7,9 +7,6 @@ # pygtk.require(). #init-hook= -# Profiled execution. -profile=no - # Add to the black list. It should be a base name, not a # path. You may set this option multiple times. ignore= @@ -41,14 +38,6 @@ disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-d # (visual studio) and html output-format=text -# Include message's id in output -include-ids=no - -# Put messages in a separate file for each module / package specified on the -# command line instead of printing them on stdout. Reports (if any) will be -# written in a file name "pylint_global.[txt|html]". -files-output=no - # Tells whether to display a full report or only the messages reports=yes @@ -59,10 +48,6 @@ reports=yes # (R0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) -# Add a comment according to your evaluation note. This is used by the global -# evaluation report (R0004). -comment=no - [VARIABLES] @@ -80,7 +65,7 @@ additional-builtins= [BASIC] # List of builtins function names that should not be used, separated by a comma -bad-functions=map,filter,apply,input,reduce +bad-names=map,filter,apply,input,reduce # Regular expression which should only match correct module names module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ @@ -186,7 +171,7 @@ max-locals=15 max-returns=6 # Maximum number of branch for function / method body -max-branchs=12 +max-branches=12 # Maximum number of statements in function / method body max-statements=50