Skip to content

Commit f1943be

Browse files
authored
Add type hints (#96)
* Add type hints Since no methods or similar are involved, just add a 'py.typed' file and the typing trove Closes #95 * Add mypy Co-authored-by: Kai Mueller <[email protected]>
1 parent a8dd655 commit f1943be

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ test: .state/env/pyvenv.cfg
1818
lint: .state/env/pyvenv.cfg
1919
$(BINDIR)/black --check bin setup.py src tests
2020
$(BINDIR)/python bin/sort.py src/trove_classifiers/__init__.py
21+
$(BINDIR)/mypy src
2122

2223
reformat: .state/env/pyvenv.cfg
2324
$(BINDIR)/black tests src

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[build-system]
22
requires = ["setuptools", "wheel", "calver"]
33
build-backend = "setuptools.build_meta"
4+
5+
[mypy]
6+
strict = true
7+
warn_unreachable = true

requirements/dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ black
22
jinja2
33
natsort
44
pytest
5+
mypy

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
"Intended Audience :: Developers",
2323
"License :: OSI Approved :: Apache Software License",
2424
"Programming Language :: Python :: 3",
25+
"Typing :: Typed",
2526
],
2627
keywords="classifiers",
2728
package_dir={"": "src"},
2829
packages=find_packages(where="src"),
30+
package_data={"": ["py.typed"]},
2931
use_calver=True,
3032
setup_requires=["calver"],
3133
)

src/trove_classifiers/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)