Skip to content

Commit 6c2a022

Browse files
committed
Add dev "extras" section with type stubs
1 parent 4d765d0 commit 6c2a022

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ repos:
155155
rev: v1.10.0
156156
hooks:
157157
- id: mypy
158+
# IMPORTANT: Keep type hinting-related dependencies of the
159+
# mypy pre-commit hook additional_dependencies in sync with
160+
# the dev section of setup.py to avoid discrepancies in type
161+
# checking between environments.
158162
additional_dependencies:
159163
- types-docopt
160164
- types-setuptools

requirements-dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--editable .[dev]
12
--requirement requirements-test.txt
23
ipython
34
mypy

setup.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ def get_version(version_file):
9393
include_package_data=True,
9494
install_requires=["docopt", "schema", "setuptools >= 24.2.0"],
9595
extras_require={
96+
# IMPORTANT: Keep type hinting-related dependencies of the dev section
97+
# in sync with the mypy pre-commit hook configuration (see
98+
# .pre-commit-config.yaml). Any changes to type hinting-related
99+
# dependencies here should be reflected in the additional_dependencies
100+
# field of the mypy pre-commit hook to avoid discrepancies in type
101+
# checking between environments.
102+
"dev": [
103+
"types-docopt",
104+
"types-setuptools",
105+
],
96106
"test": [
97107
"coverage",
98108
# coveralls 1.11.0 added a service number for calls from
@@ -105,7 +115,7 @@ def get_version(version_file):
105115
"pre-commit",
106116
"pytest-cov",
107117
"pytest",
108-
]
118+
],
109119
},
110120
# Conveniently allows one to run the CLI tool as `example`
111121
entry_points={"console_scripts": ["example = example.example:main"]},

0 commit comments

Comments
 (0)