-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
1,630 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Ensure this configuration aligns with format.sh and requirements.txt | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 # Match the version from requirements | ||
hooks: | ||
- id: black | ||
name: black (IBM specific) | ||
files: "^sky/skylet/providers/ibm/.*" # Match only files in the IBM directory | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 # Match the version from requirements | ||
hooks: | ||
# First isort command | ||
- id: isort | ||
name: isort (general) | ||
args: | ||
- "--sg=build/**" # Matches "${ISORT_YAPF_EXCLUDES[@]}" | ||
- "--sg=sky/skylet/providers/ibm/**" | ||
files: "^(sky|tests|examples|llm|docs)/.*" # Only match these directories | ||
# Second isort command | ||
- id: isort | ||
name: isort (IBM specific) | ||
args: | ||
- "--profile=black" | ||
- "-l=88" | ||
- "-m=3" | ||
files: "^sky/skylet/providers/ibm/.*" # Only match IBM-specific directory | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.991 # Match the version from requirements | ||
hooks: | ||
- id: mypy | ||
args: | ||
# From tests/mypy_files.txt | ||
- "sky" | ||
- "--exclude" | ||
- "sky/benchmark|sky/callbacks|sky/skylet/providers/azure|sky/resources.py|sky/backends/monkey_patches" | ||
pass_filenames: false | ||
additional_dependencies: | ||
- types-PyYAML | ||
- types-requests<2.31 # Match the condition in requirements.txt | ||
- types-setuptools | ||
- types-cachetools | ||
- types-pyvmomi | ||
|
||
- repo: https://github.com/google/yapf | ||
rev: v0.32.0 # Match the version from requirements | ||
hooks: | ||
- id: yapf | ||
name: yapf | ||
exclude: (build/.*|sky/skylet/providers/ibm/.*) # Matches exclusions from the script | ||
args: ['--recursive', '--parallel'] # Only necessary flags | ||
additional_dependencies: [toml==0.10.2] | ||
|
||
- repo: https://github.com/pylint-dev/pylint | ||
rev: v2.14.5 # Match the version from requirements | ||
hooks: | ||
- id: pylint | ||
additional_dependencies: | ||
- pylint-quotes==0.2.3 # Match the version from requirements | ||
name: pylint | ||
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.