/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/lint.yml
56 строк
2 KB
Marco Edward Gorelli
MNT Use pyrefly instead of mypy for type-checking (#34527)
10 авг 2026, 16:51
Не верифицирован
10 авг 2026, 16:51
94a85a8
Код
Авторство
О чём код?
# This workflow is used to trigger the commenter bot in bot-lint-comment.yml # file. It stores the output of the linter to be used by the commenter bot. name: Linter permissions: contents: read on: - pull_request concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest # setting any permission will set everything else to none for GITHUB_TOKEN permissions: pull-requests: none steps: - name: Checkout code uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python uses: actions/setup-python@v6 with: python-version: 3.11 - name: Install dependencies run: | pip install -r build_tools/github/lint_lock.txt # we save the versions of the linters to be used in the error message later. python -c "from importlib.metadata import version; print(f\"pytest={version('pytest')}\")" >> /tmp/versions.txt python -c "from importlib.metadata import version; print(f\"ruff={version('ruff')}\")" >> /tmp/versions.txt python -c "from importlib.metadata import version; print(f\"pyrefly={version('pyrefly')}\")" >> /tmp/versions.txt python -c "from importlib.metadata import version; print(f\"cython-lint={version('cython-lint')}\")" >> /tmp/versions.txt - name: Run linting run: | set +e ./build_tools/linting.sh &> /tmp/linting_output.txt cat /tmp/linting_output.txt - name: Upload Artifact if: always() uses: actions/upload-artifact@v7 with: name: lint-log path: | /tmp/linting_output.txt /tmp/versions.txt retention-days: 1