diff --git a/.github/workflows/python-poetry-ci.yml b/.github/workflows/python-poetry-ci.yml index f0b5ac5..d8d5957 100644 --- a/.github/workflows/python-poetry-ci.yml +++ b/.github/workflows/python-poetry-ci.yml @@ -1,6 +1,17 @@ name: Linting on: workflow_call: + inputs: + extras: + description: > + Space-separated list of extras to install when type checking. + Defaults to no extras. + # In the future I'd like to change setup-python-poetry to install all extras + # by default, using e.g. an implementation of + # /~https://github.com/python-poetry/poetry/issues/3413 + type: string + required: false + default: "" jobs: @@ -33,6 +44,9 @@ jobs: - name: Setup Poetry uses: matrix-org/setup-python-poetry@v1 + with: + # We want to make use of type hints in optional dependencies too. + extras: "${{ inputs.extras }}" - name: Restore/persist mypy's cache uses: AustinScola/mypy-cache-github-action@v1