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

Update .pre-commit-config.yaml #286

Closed
wants to merge 7 commits into from
Closed
Changes from 4 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
108 changes: 58 additions & 50 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: __snapshots__
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
exclude: ^(docs/assets/.*|assets/.*)$

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.10.0
hooks:
- id: reorder-python-imports

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a6
hooks:
- id: pylint

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.318
exclude: ^typings/
hooks:
- id: pyright

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.35.0
hooks:
- id: markdownlint
- id: markdownlint-fix

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt

- repo: https://github.com/dhruvmanila/remove-print-statements
rev: v0.5.2
hooks:
- id: remove-print-statements
args:
- --verbose
- --ignore=tests/conftest.py
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: __snapshots__
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
exclude: ^(docs/assets/.*|assets/.*)$

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.10.0
hooks:
- id: reorder-python-imports

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a6
hooks:
- id: pylint

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.318
exclude: ^typings/
hooks:
- id: pyright

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.35.0
hooks:
- id: markdownlint
- id: markdownlint-fix

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args:
- --line-length=80

- repo: https://github.com/dhruvmanila/remove-print-statements
rev: v0.5.2
hooks:
- id: remove-print-statements
args:
- --verbose
- --ignore=tests/conftest.py

- repo: https://github.com/adrienverge/yamllint
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind we already have this hook: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt

could it cause a problem? I mean, will the 2 diffferent yaml linters/formatters interfere with each other? If both are actually needed, then could it be done in such a way that the second one will only care about the line length (by ignoring all other rules/formatting?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes u r right, I have configured one of the linter to ignore line length, by making yamlfmt to only check line length

rev: v1.26.3
hooks:
- id: yamllint
args:
- --width=80