From a98f54d0f07b2428c670a0e4244744c300399aef Mon Sep 17 00:00:00 2001 From: ZePing Guo Date: Wed, 27 Nov 2024 14:40:15 +0800 Subject: [PATCH 1/4] fix the pylint hook --- .pre-commit-config.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2db4211454..9fd3d5792d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,14 +67,7 @@ repos: additional_dependencies: - pylint-quotes==0.2.3 # Match the version from requirements name: pylint-only-changed-files - entry: > - bash -c ' - MERGEBASE=$(git merge-base origin/main HEAD); - changed_files=$(git diff --name-only --diff-filter=ACM "$MERGEBASE" -- "sky/*.py" "sky/*.pyi"); - if [[ -n "$changed_files" ]]; then - echo "$changed_files" | tr "\n" "\0" | xargs -0 pylint --load-plugins=pylint_quotes --rcfile=.pylintrc; - else - echo "Pylint skipped: no files changed in sky/."; - fi' - pass_filenames: false - always_run: true + args: + - --rcfile=.pylintrc # Use your custom pylint configuration + - --load-plugins=pylint_quotes # Load the pylint-quotes plugin + pass_filenames: true From 26fafc1ccc1ac88838cdbf10e6d91dc396053e3f Mon Sep 17 00:00:00 2001 From: ZePing Guo Date: Wed, 27 Nov 2024 14:44:19 +0800 Subject: [PATCH 2/4] remove default arg --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9fd3d5792d4..222a03d0c7b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,4 +70,3 @@ repos: args: - --rcfile=.pylintrc # Use your custom pylint configuration - --load-plugins=pylint_quotes # Load the pylint-quotes plugin - pass_filenames: true From 894c279a7a2aecbeeace77deb837559850363470 Mon Sep 17 00:00:00 2001 From: ZePing Guo Date: Wed, 27 Nov 2024 14:47:33 +0800 Subject: [PATCH 3/4] change name --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 222a03d0c7b..e91046f4da3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: - id: pylint additional_dependencies: - pylint-quotes==0.2.3 # Match the version from requirements - name: pylint-only-changed-files + name: pylint args: - --rcfile=.pylintrc # Use your custom pylint configuration - --load-plugins=pylint_quotes # Load the pylint-quotes plugin From 835977da5b3eae8e01d25f3f7078767d7e16971c Mon Sep 17 00:00:00 2001 From: ZePing Guo Date: Wed, 27 Nov 2024 15:12:21 +0800 Subject: [PATCH 4/4] limit pylint files --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e91046f4da3..db40b03b5fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,3 +70,5 @@ repos: args: - --rcfile=.pylintrc # Use your custom pylint configuration - --load-plugins=pylint_quotes # Load the pylint-quotes plugin + files: ^sky/ # Only include files from the 'sky/' directory + exclude: ^sky/skylet/providers/ibm/