Skip to content

Commit

Permalink
Allow extras to be installed for typechecking (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Apr 27, 2022
1 parent da88cb4 commit 57a80af
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python-poetry-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: Linting
on:
workflow_call:
inputs:
typechecking-extras:
description: >
Space-separated list of package extras to install when type checking.
(I.e. the entries in `pyproject.toml`'s `[tool.poetry.extras]` section.)
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:
Expand Down Expand Up @@ -33,6 +45,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.typechecking-extras }}"

- name: Restore/persist mypy's cache
uses: AustinScola/mypy-cache-github-action@df56268388422ee282636ee2c7a9cc55ec644a41
Expand Down

0 comments on commit 57a80af

Please sign in to comment.