Skip to content

Commit

Permalink
ci: Run pylint as pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuestengecko committed Jul 5, 2024
1 parent 1d9196c commit 71be165
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,3 @@ jobs:
- name: Run Pre-Commit
run: |-
pre-commit run --all-files
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Upgrade pip
run: |-
python -m pip install -U pip
- name: Install pylint
run: |-
python -m pip install pylint
- name: Run pylint
run: |-
pylint -dfixme capella_model_explorer || exit $(($? & ~24))
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ repos:
- id: mypy
additional_dependencies:
- types-pyyaml==6.0.11
- repo: https://github.com/pylint-dev/pylint
rev: v3.1.0
hooks:
- id: pylint
require_serial: false
args: [-rn, -sn, -dfixme, -dduplicate-code]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
Expand Down
2 changes: 1 addition & 1 deletion capella_model_explorer/backend/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import operator
import traceback
from pathlib import Path
from typing import Any, Dict, List, Optional, TypedDict
from typing import Any, Dict, List, Optional

import capellambse
import yaml
Expand Down
4 changes: 2 additions & 2 deletions tests/test_capella_model_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_template_loading():
"description": "This is a test template",
"scope": {"type": "System", "below": "System"},
}
template = Template(**template_raw)
Template(**template_raw)


def test_category_loading():
Expand All @@ -44,7 +44,7 @@ def test_category_loading():
"idx": "test",
"templates": [template_raw],
}
category = TemplateCategory(**category_raw)
TemplateCategory(**category_raw)


def test_index_templates():
Expand Down

0 comments on commit 71be165

Please sign in to comment.