diff --git a/.github/workflows/pr_lint.yaml b/.github/workflows/pr_lint.yaml deleted file mode 100644 index b5f0e6f47f..0000000000 --- a/.github/workflows/pr_lint.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Run linting and commit changes - -on: - pull_request_target: - types: - - opened - - synchronize - - ready_for_review - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: - contents: write - -jobs: - pre-commit-check: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - env: - SKIP: "docs" - steps: - - uses: actions/checkout@v4 - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.head_ref }} - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Set $PY environment variable - run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v4 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: pre-commit/action@v3.0.1 - continue-on-error: true - with: - extra_args: --hook-stage manual --all-files - - name: Commit - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "fix: add missing pre-commit changes" diff --git a/.github/workflows/docs_update-references.yaml b/.github/workflows/pr_update_linting_and_api_references.yaml similarity index 78% rename from .github/workflows/docs_update-references.yaml rename to .github/workflows/pr_update_linting_and_api_references.yaml index 8776fb6507..43cd370ece 100644 --- a/.github/workflows/docs_update-references.yaml +++ b/.github/workflows/pr_update_linting_and_api_references.yaml @@ -1,4 +1,4 @@ -name: Generate API References documentation +name: Run linting, update API References and commit changes on: pull_request_target: @@ -6,8 +6,6 @@ on: - opened - synchronize - ready_for_review - paths: - - faststream/** concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -32,6 +30,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.12" + - name: Set $PY environment variable + run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' shell: bash @@ -39,6 +39,10 @@ jobs: run: | set -ux uv pip install --system -e .[dev] + - uses: pre-commit/action@v3.0.1 + continue-on-error: true + with: + extra_args: --hook-stage manual --all-files - name: Run build docs run: bash scripts/build-docs.sh - name: Commit diff --git a/faststream/dummy.py b/faststream/dummy.py index c24b9481f4..24707bc3f6 100644 --- a/faststream/dummy.py +++ b/faststream/dummy.py @@ -12,3 +12,11 @@ def __init__(self) -> None: def strange_method(self) -> str: return "strange" + + +class Twice: + def __init__(self) -> None: + pass + + def twice_method(self) -> str: + return "twice"