diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 04e5c5b..8a99ca6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,14 +5,14 @@ ci: - deps repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.9 + rev: v0.6.3 hooks: - id: ruff args: - --fix - --exit-non-zero-on-fix - repo: https://github.com/pycontribs/mirrors-prettier - rev: v3.3.2 + rev: v3.3.3 hooks: - id: prettier always_run: true @@ -21,7 +21,7 @@ repos: - prettier-plugin-toml - prettier-plugin-sort-json - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.8.2 + rev: v8.13.3 hooks: - id: cspell # entry: codespell --relative @@ -32,7 +32,7 @@ repos: hooks: - id: markdownlint - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black args: @@ -49,7 +49,7 @@ repos: - id: debug-statements language_version: python3 - repo: https://github.com/ansible/ansible-lint - rev: v24.6.0 + rev: v24.7.0 hooks: - id: ansible-lint args: [--fix] @@ -63,7 +63,7 @@ repos: - yaml entry: yamllint --strict - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.11.2 hooks: - id: mypy args: [--python-version, "3.10"] @@ -79,7 +79,7 @@ repos: - typer-config - typer>=0.12.2 - repo: https://github.com/pycqa/pylint - rev: v3.2.3 + rev: v3.2.7 hooks: - id: pylint additional_dependencies: diff --git a/src/mk/pre.py b/src/mk/pre.py index 6bc8b5f..362785e 100644 --- a/src/mk/pre.py +++ b/src/mk/pre.py @@ -46,10 +46,10 @@ def drafts() -> None: """Pre helps you chain releases on github.""" for repo in app.repos: repo_link = f"[markdown.link][link=https://github.com/{repo}]{repo}[/][/]" - result = run( + result = run( # noqa: S602 f'gh api repos/{repo}/releases --jq "[.[] | select(.draft)"]', text=True, - shell=True, # noqa: S602 + shell=True, capture_output=True, check=True, ) @@ -104,10 +104,10 @@ def alerts() -> None: cmd = "GH_PAGER= gh " cmd += f"api /repos/{repo}/dependabot/alerts" cmd += " --jq='.[] | select(.state!=\"fixed\") | .html_url'" - result = run( + result = run( # noqa: S602 cmd, text=True, - shell=True, # noqa: S602 + shell=True, capture_output=True, check=False, ) diff --git a/src/mk/tools/make.py b/src/mk/tools/make.py index d1753c5..efdb893 100644 --- a/src/mk/tools/make.py +++ b/src/mk/tools/make.py @@ -35,7 +35,7 @@ def actions(self) -> list[Action]: msg = "Makefile not found" raise RuntimeError(msg) with open(self.makefile, encoding="utf-8") as file: - for line in file.readlines(): + for line in file: # Current implementation assumes that descriptions are added # using double ## after the target name. # Inspired by https://github.com/containers/podman/blob/master/Makefile#L127