name: Ruff Lint

on:
  pull_request:
    paths:
      - '**/*.py'

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Install dependencies
        run: pip install pre-commit

      - name: Run Ruff (non-blocking on PR changes)
        run: |
          pre-commit run ruff --from-ref origin/main --to-ref HEAD
