Skip to content

Commit

Permalink
Add dev "extras" section with type stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsf9k committed Sep 25, 2024
1 parent 4d765d0 commit 6c2a022
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ repos:
rev: v1.10.0
hooks:
- id: mypy
# IMPORTANT: Keep type hinting-related dependencies of the
# mypy pre-commit hook additional_dependencies in sync with
# the dev section of setup.py to avoid discrepancies in type
# checking between environments.
additional_dependencies:
- types-docopt
- types-setuptools
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--editable .[dev]
--requirement requirements-test.txt
ipython
mypy
Expand Down
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ def get_version(version_file):
include_package_data=True,
install_requires=["docopt", "schema", "setuptools >= 24.2.0"],
extras_require={
# IMPORTANT: Keep type hinting-related dependencies of the dev section
# in sync with the mypy pre-commit hook configuration (see
# .pre-commit-config.yaml). Any changes to type hinting-related
# dependencies here should be reflected in the additional_dependencies
# field of the mypy pre-commit hook to avoid discrepancies in type
# checking between environments.
"dev": [
"types-docopt",
"types-setuptools",
],
"test": [
"coverage",
# coveralls 1.11.0 added a service number for calls from
Expand All @@ -105,7 +115,7 @@ def get_version(version_file):
"pre-commit",
"pytest-cov",
"pytest",
]
],
},
# Conveniently allows one to run the CLI tool as `example`
entry_points={"console_scripts": ["example = example.example:main"]},
Expand Down

0 comments on commit 6c2a022

Please sign in to comment.