Skip to content

Commit

Permalink
chore: Lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
BapRx committed Oct 24, 2022
1 parent d134366 commit 93ca8fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.10.0
hooks:
- id: black
args: [--config=pyproject.toml]

- repo: https://github.com/pycqa/isort
rev: 5.10.0
rev: 5.10.1
hooks:
- id: isort
files: "\\.(py)$"
args: [--settings-path=pyproject.toml]

- repo: https://github.com/charliermarsh/ruff
rev: v0.0.29
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.82
hooks:
- id: lint

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.10.1
hooks:
- id: validate-pyproject
4 changes: 3 additions & 1 deletion alert_exporter/sources/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ def get_prometheus_rules(self) -> None:
"runbook": r.get("annotations", {}).get("runbook_url", ""),
}
for r in grp["rules"]
if all(r.get('labels', {}).get(k) == v for k, v in self.filters.items())
if all(
r.get("labels", {}).get(k) == v for k, v in self.filters.items()
)
]

0 comments on commit 93ca8fa

Please sign in to comment.