Skip to content

Commit

Permalink
Add py.typed marker file for downstream type checking. (#72)
Browse files Browse the repository at this point in the history
In order for mypy to use the types in an installed package's code for
type-checking purposes, it needs this marker file.  See, for example,
https://github.com/python/mypy/blob/master/mypy/py.typed
  • Loading branch information
thetorpedodog authored Jan 9, 2023
1 parent 1abab18 commit a7b623e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python-spec/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ requires-python = "~=3.7"
[project.optional-dependencies]
dev = ["black", "isort", "setuptools-scm"]

[tool.setuptools.dynamic]
version = { attr = "somacore._version.version" }
[tool.setuptools]
packages.find.where = ["src"]
package-data.somacore = ["py.typed"]
dynamic.version.attr = "somacore._version.version"


[tool.isort]
profile = "black"
Expand Down
2 changes: 2 additions & 0 deletions python-spec/src/somacore/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file to indicate that this package contains Python typing information,
# and that mypy can use it to typecheck client code.

0 comments on commit a7b623e

Please sign in to comment.