Skip to content

Commit 412b83f

Browse files
author
David Robertson
committed
Allow extras to be installed for typechecking
1 parent 9588c2b commit 412b83f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/python-poetry-ci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Linting
22
on:
33
workflow_call:
4+
inputs:
5+
typechecking-extras:
6+
description: >
7+
Space-separated list of package extras to install when type checking.
8+
(I.e. the entries in `pyproject.toml`'s `[tool.poetry.extras]` section.)
9+
Defaults to no extras.
10+
# In the future I'd like to change setup-python-poetry to install all extras
11+
# by default, using e.g. an implementation of
12+
# https://github.com/python-poetry/poetry/issues/3413
13+
type: string
14+
required: false
15+
default: ""
416

517

618
jobs:
@@ -33,6 +45,9 @@ jobs:
3345

3446
- name: Setup Poetry
3547
uses: matrix-org/setup-python-poetry@v1
48+
with:
49+
# We want to make use of type hints in optional dependencies too.
50+
extras: "${{ inputs.typechecking-extras }}"
3651

3752
- name: Restore/persist mypy's cache
3853
uses: AustinScola/mypy-cache-github-action@v1

0 commit comments

Comments
 (0)