From 6e849db5015e24059368b75e1a194c511a0b990a Mon Sep 17 00:00:00 2001 From: Nageswara Nandigam <84482346+nagworld9@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:27:29 -0700 Subject: [PATCH] supress too-many-positional-args pylint warn (#3224) (#3225) (cherry picked from commit 4dcf95c07a4b84d3a48f68ae41030b2489cb1ea0) --- .github/workflows/ci_pr.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_pr.yml b/.github/workflows/ci_pr.yml index 96db6e7f9e..9ae44ec8cb 100644 --- a/.github/workflows/ci_pr.yml +++ b/.github/workflows/ci_pr.yml @@ -148,9 +148,14 @@ jobs: # * 'contextmanager-generator-missing-cleanup' are false positives if yield is used inside an if-else block for contextmanager generator functions. # (https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/contextmanager-generator-missing-cleanup.html). # This is not implemented on versions (3.0-3.7) Bad option value 'contextmanager-generator-missing-cleanup' (bad-option-value) + # * 3.9-3.11 will produce "too-many-positional-arguments" for several methods that are having more than 5 args, so we suppress that warning. + # (R0917: Too many positional arguments (8/5) (too-many-positional-arguments)) PYLINT_OPTIONS="--rcfile=ci/pylintrc --jobs=0" if [[ "${{ matrix.python-version }}" == "3.9" ]]; then - PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=no-member --ignore=main.py" + PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=no-member,too-many-positional-arguments --ignore=main.py" + fi + if [[ "${{ matrix.python-version }}" =~ ^3\.(10|11)$ ]]; then + PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=too-many-positional-arguments" fi if [[ "${{ matrix.python-version }}" =~ ^3\.[0-7]$ ]]; then PYLINT_OPTIONS="$PYLINT_OPTIONS --disable=no-self-use,bad-option-value"