From 78196148dbb601987bc3e1e7f55d5d3f26abb176 Mon Sep 17 00:00:00 2001 From: Sudhansu <13695177+the-lazy-learner@users.noreply.github.com> Date: Fri, 4 Nov 2022 22:36:53 +0530 Subject: [PATCH 1/5] Modify precommit config yaml and change name of typing step to Typing + pylint. --- .github/workflows/code-checks.yml | 2 +- .pre-commit-config.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 738263369409c..583619826265c 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -86,7 +86,7 @@ jobs: echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV if: ${{ steps.build.outcome == 'success' && always() }} - - name: Typing + - name: Typing + pylint uses: pre-commit/action@v2.0.3 with: extra_args: --hook-stage manual --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1893f57fc09c1..4887cf1380f31 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,6 +63,9 @@ repos: rev: v2.15.5 hooks: - id: pylint + - language: system + - pass_filenames: false + - stages: [manual] - repo: https://github.com/PyCQA/isort rev: 5.10.1 hooks: From cda788d055e12b52e03334fd89ece6051b28c284 Mon Sep 17 00:00:00 2001 From: Sudhansu <13695177+the-lazy-learner@users.noreply.github.com> Date: Fri, 4 Nov 2022 23:05:19 +0530 Subject: [PATCH 2/5] Fix incorrect syntax. --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4887cf1380f31..e66f7a3ce6a10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,9 +63,9 @@ repos: rev: v2.15.5 hooks: - id: pylint - - language: system - - pass_filenames: false - - stages: [manual] + language: system + pass_filenames: false + stages: [manual] - repo: https://github.com/PyCQA/isort rev: 5.10.1 hooks: From 8256da2bf66f717167047e1a92f3defac0f39d5d Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Fri, 4 Nov 2022 18:28:37 +0000 Subject: [PATCH 3/5] add pylint to environment.yml --- .pre-commit-config.yaml | 1 - environment.yml | 1 + requirements-dev.txt | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e66f7a3ce6a10..4d83803975ff4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,7 +64,6 @@ repos: hooks: - id: pylint language: system - pass_filenames: false stages: [manual] - repo: https://github.com/PyCQA/isort rev: 5.10.1 diff --git a/environment.yml b/environment.yml index f6ef6367800bd..2e1ebba4afdf6 100644 --- a/environment.yml +++ b/environment.yml @@ -89,6 +89,7 @@ dependencies: - flake8-bugbear=22.7.1 # used by flake8, find likely bugs - isort>=5.2.1 # check that imports are in the right order - mypy=0.981 + - pylint=2.15.5 - pre-commit>=2.15.0 - pycodestyle # used by flake8 - pyupgrade diff --git a/requirements-dev.txt b/requirements-dev.txt index 5e98113625374..16aaffefeb6ed 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -68,6 +68,7 @@ flake8==5.0.4 flake8-bugbear==22.7.1 isort>=5.2.1 mypy==0.981 +pylint==2.15.5 pre-commit>=2.15.0 pycodestyle pyupgrade From 1d1c5404fb51a538a0804f5918b995b9f2453dd5 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Fri, 4 Nov 2022 18:30:54 +0000 Subject: [PATCH 4/5] ignore c-extension-no-member --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2e2e3fd914c86..ea1578a7b92e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ exclude = ''' max-line-length = 88 disable = [ "abstract-class-instantiated", + "c-extension-no-member", "import-error", "invalid-repr-returned", "invalid-unary-operand-type", From aa940dbbd58347bd8e8f2db00c6a5f04808d4f10 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Fri, 4 Nov 2022 18:39:09 +0000 Subject: [PATCH 5/5] ignore invalid-sequence-index and missing-timeout --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ea1578a7b92e2..e462ce740c4e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ disable = [ "c-extension-no-member", "import-error", "invalid-repr-returned", + "invalid-sequence-index", "invalid-unary-operand-type", "no-member", "no-name-in-module", @@ -152,6 +153,7 @@ disable = [ "invalid-overridden-method", "keyword-arg-before-vararg", "method-cache-max-size-none", + "missing-timeout", "non-parent-init-called", "overridden-final-method", "pointless-statement",