Skip to content

Commit

Permalink
feat: add PEP-561 py.typed file for downstream type checkers (#440)
Browse files Browse the repository at this point in the history
* feat: add PEP-561 py.typed file for downstream type checkers

This follows PEP-561 to mark syrupy as compatible with type
checking (driven by the type annotations that already exist and are
checked), by creating an empty `py.typed` in the project. This stops
users from having to ignore syrupy when type checking, and allows the
type checker to provide specific guidance about possible problems.

Fixes #439
  • Loading branch information
huonw authored Dec 1, 2020
1 parent 620fb4a commit fe15bdb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def readme() -> str:
"write_to": "version.txt",
},
package_dir={"": "src"},
package_data={"": ["py.typed"]},
packages=find_packages("./src"),
zip_safe=False,
entry_points={"pytest11": ["syrupy = syrupy"]},
Expand Down
Empty file added src/syrupy/py.typed
Empty file.

0 comments on commit fe15bdb

Please sign in to comment.