Merge pull request #1354 from PyThaiNLP/copilot/narrow-type-hints-update #3100
This file contains hidden or 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: Lint | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| paths-ignore: | |
| - '**.cff' | |
| - '**.json' | |
| - '**.md' | |
| - '**.rst' | |
| - '**.txt' | |
| - '**.yml' | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - dev | |
| paths-ignore: | |
| - '**.cff' | |
| - '**.json' | |
| - '**.md' | |
| - '**.rst' | |
| - '**.txt' | |
| - '**.yml' | |
| - 'docs/**' | |
| # Avoid duplicate runs for the same source branch and repository. | |
| # For pull_request events, uses the source repo name from | |
| # github.event.pull_request.head.repo.full_name; otherwise uses github.repository. | |
| # For push events, uses the branch name from github.ref_name. | |
| # For pull_request events, uses the source branch name from github.head_ref. | |
| # This ensures events for the same repo and branch share the same group, | |
| # and avoids cross-fork collisions when branch names are reused. | |
| concurrency: | |
| group: >- | |
| ${{ github.workflow }}-${{ | |
| github.event.pull_request.head.repo.full_name || github.repository | |
| }}-${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Ruff | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| src: "./pythainlp ./tests ./examples" | |
| args: check --verbose --config pyproject.toml |