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

Pylint #433

Merged
merged 13 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 9 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ jobs:
steps:
- uses: actions/checkout@v4
#//TEMP we need to check only modified files WRT main
- name: run pre-commit (all)
- name: Install requirements (apt)
run: |
sudo apt-get update
sudo apt-get install -y libvirt-dev
- name: Install requirements (uv pip)
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
make venv
make install
make install-pre-commit
- name: Run pre-commit (all)
run: |
source .venv/bin/activate
make pre-commit-run-all
22 changes: 20 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
exclude: "dockerfiles|ci_build_images/qpress|cross-reference/crossreference/cr/static/cr/font-awesome"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -28,7 +28,7 @@ repos:
# - id: flake8
# name: Check python (flake8)
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.35.1
hooks:
- id: yamllint
name: Check yaml files (yamllint)
Expand All @@ -53,6 +53,24 @@ repos:
name: Checks for common misspellings in text files
entry: codespell
language: python
- repo: https://github.com/PyCQA/pylint.git
rev: v3.1.0
hooks:
- id: pylint
name: Check python (pylint)
entry: pylint
language: system
types: [file]
files: \.(cfg|py|tac)$
# TODO add cross-reference in the future
# exclude: ^cross-reference/.*$
args:
[
"--errors-only",
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Config file
"--disable=django-not-configured", # Silence django warning
]
- repo: local
hooks:
- id: docker-hadolint
Expand Down
Loading