📝 Update documentation #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pyright Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "envs/**" | |
- "aioarxiv/**" | |
- "tests/**" | |
- ".github/actions/setup-python/**" | |
- ".github/workflows/pyright.yml" | |
- "pyproject.toml" | |
- "pdm.lock" | |
workflow_dispatch: | |
inputs: | |
python-version: | |
description: 'Python version' | |
required: false | |
type: choice | |
options: | |
- 'all' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
default: 'all' | |
debug-mode: | |
description: 'enable debug mode' | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
pyright: | |
name: Pyright Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
fail-fast: false | |
concurrency: | |
group: pyright-${{ github.ref }}-${{ matrix.python-version }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: ./.github/actions/setup-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
with-groups: "test,dev" | |
no-root: "false" | |
env-dir: "." | |
- name: Run Pyright | |
shell: bash | |
run: | | |
extra_args="${{ github.event.inputs.debug-mode == 'true' && '--warnings --verbose --level verbose' || '--warnings --verbose' }}" | |
pdm run pyright . $extra_args |