langflow/.github/workflows/lint-py.yml
ming 8ccb9e7597
Fix mypy (#2204)
* mypy github action

* fix endpoints.py mypy lint

* directly run poetry run mypy

* line based mypy error suppression

* switch to use make lint

* fix ruff issues

* fix EmbedComponent lint

* fix prompt.py's lint
2024-06-18 13:52:54 -04:00

37 lines
958 B
YAML

name: Lint Python
on:
pull_request:
paths:
- "poetry.lock"
- "pyproject.toml"
- "src/backend/**"
- "tests/**"
env:
POETRY_VERSION: "1.8.2"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Python dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install
make lint
env:
GITHUB_TOKEN: ${{ secrets.github_token }}