Skip to content

Commit

Permalink
Trunk cannot find python linters (#320)
Browse files Browse the repository at this point in the history
Restore python linters management through trunk.
  • Loading branch information
tcarmet authored Aug 4, 2023
1 parent 4f8561e commit ca1b99f
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ plugins:
uri: https://github.com/trunk-io/plugins
lint:
definitions:
# Configure pyright to identify the project root to read the configuration
# and use the project's virtual environment
- name: pyright
commands:
- name: lint
run: pyright --project ${workspace} --outputjson ${target}
environment:
- name: PATH
value: ${workspace}/.venv/bin:${env.PATH}
enabled:
# Linters installed and managed by poetry.
- black
- isort
- ruff
- yamllint
- pyright
# Managed and installed by trunk.
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
Expand All @@ -37,17 +34,6 @@ lint:
- trivy
- terrascan
runtimes:
definitions:
- type: python
system_version: required
linter_environment:
- name: PYTHONPATH
value: ${workspace}/.venv/bin/python
- name: VIRTUAL_ENV
value: ${workspace}/.venv
- name: PATH
value: ${env.VIRTUAL_ENV}/bin:${env.PATH}

enabled:
- [email protected]
- python@>=3.11.4
Expand Down

0 comments on commit ca1b99f

Please sign in to comment.