From 7991d64f3ca00003189c610e57c273bea9f605bb Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:46:31 +0530 Subject: [PATCH] ci(llamaindex): Update env variable to use typecheck build from sdks/llamaindex/src (#116) Running lint type checker (mypy) on the sdk tests can raise errors like: https://github.com/googleapis/genai-toolbox/actions/runs/12194679407/job/34018934437 because it's looking in the wrong place for type definitions. To fix this, we'll tell the type checker (mypy) to specifically include the toolbox_llamaindex_sdk module from our SDK source code when it's checking the tests. This will ensure it uses the correct type information and avoids these errors. --- .github/workflows/lint-llamaindex.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint-llamaindex.yaml b/.github/workflows/lint-llamaindex.yaml index c4414fb33e..cdcd8484e7 100644 --- a/.github/workflows/lint-llamaindex.yaml +++ b/.github/workflows/lint-llamaindex.yaml @@ -49,4 +49,6 @@ jobs: isort --check . - name: Run type-check - run: mypy --install-types --non-interactive --explicit-package-bases sdks/llamaindex \ No newline at end of file + env: + MYPYPATH: 'sdks/llamaindex/src' + run: mypy --install-types --non-interactive --explicit-package-bases sdks/llamaindex