Skip to content

activate PTB type checker #295

Description

@MarleneKress79789
  • fix typing, reenable in pre-commit-config -> add following to pre-commit-config
 - repo: local
   hooks:
     - id: type-check
       name: type-check
       types: [ python ]
       pass_filenames: false
       language: system
       entry: poetry run nox -s lint:typing
       stages: [ pre-push ] 
  • once project passes type checker checks, reenable in ci by adding the following to checks.yml
  Type-Check:
    name: Type Checking (Python-${{ matrix.python-version }})
    needs: [ Version-Check, build-matrix ]
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}

    steps:
      - name: SCM Checkout
        uses: actions/checkout@v4

      - name: Setup Python & Poetry Environment
        uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
        with:
          python-version: ${{ matrix.python-version }}
          poetry-version: 2.0.1

      - name: Run type-check
        run: poetry run nox -s lint:typing
  • Test task in checks.yml should deped on the others, so add dependencie to type cheker liek this:
needs: [ Type-Check, Security, build-matrix ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringCode improvement without behavior change
    No fields configured for Refactoring.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions