Skip to content

Commit 36f9be5

Browse files
authored
Run the python checks for mypy and pyright on the Python the project is using, not the global python (#32)
1 parent 5049c1c commit 36f9be5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

analyze-project/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ runs:
5959
- name: Check for mypy and pyright installation
6060
id: check_tools
6161
run: |
62+
poetry run python - <<EOF
6263
import os
6364
from importlib.metadata import version, PackageNotFoundError
6465
@@ -72,7 +73,9 @@ runs:
7273
with open(os.environ["GITHUB_OUTPUT"], "a") as output:
7374
print(f"mypy={is_installed('mypy')}", file=output)
7475
print(f"pyright={is_installed('pyright')}", file=output)
75-
shell: python
76+
EOF
77+
working-directory: ${{ inputs.project-directory }}
78+
shell: bash
7679
- name: Echo check_tools outputs
7780
run: |
7881
echo "mypy installed: ${{ steps.check_tools.outputs.mypy }}"

0 commit comments

Comments
 (0)