Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pre commit config to help format before pushing #4258

Merged
merged 10 commits into from
Nov 27, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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: 23.12.1
hooks:
- id: black
files: sky/skylet/providers/ibm/.*

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: sky/skylet/providers/ibm/.*
args: ["--profile", "google"]
- id: isort
files: sky/skylet/providers/ibm/.*
args: ["--profile", "black", "-l", "88", "-m", "3"]
stages: [pre-commit]

- repo: https://github.com/google/yapf
rev: v0.32.0
hooks:
- id: yapf
exclude: (build/.*|sky/skylet/providers/ibm/.*)
additional_dependencies: [toml]

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
additional_dependencies:
- pylint==2.14.5
- pylint-quotes==0.2.3
args: [
"--load-plugins=pylint_quotes",
"--rcfile=.pylintrc"
]
exclude: ^(build/.*|sky/skylet/providers/ibm/.*|tests/test_smoke\.py)$

- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
require_serial: true
exclude: ^tests/test_smoke\.py$
Loading