From 1719ad5407acdf3c8444efb70207ddabd4496965 Mon Sep 17 00:00:00 2001 From: Steve Keay Date: Thu, 31 Oct 2024 11:39:08 +0000 Subject: [PATCH] Add pyright type checking for understack-workflows python code Note that we hard-code python deps because the pre-commit checker operates in its own independent venv and cannot access the deps that poetry installs. This seems broken, as it allows the versions to drift. However it is better than nothing. --- .pre-commit-config.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca26115ce..866259c11 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,3 +65,19 @@ repos: rev: 38.114.0 hooks: - id: renovate-config-validator + - repo: https://github.com/RobertCraigie/pyright-python + rev: v1.1.387 + hooks: + - id: pyright + files: '^python/understack-workflows/' + args: ["--threads"] + additional_dependencies: + - "kubernetes" + - "pydantic" + - "pynautobot" + - "pytest" + - "pytest_lazy_fixtures" + - "python-ironicclient" + - "requests" + - "sushy" + - "types-requests"