Skip to content

Commit

Permalink
Add py.typed
Browse files Browse the repository at this point in the history
This marker file is necessary when *distributing* libraries, in order
for the consumer side to know that the library is typed and for
typecheckers to know to use it directly rather than look for a stub
package (or give up on typing).

Closes #218
  • Loading branch information
masklinn committed Oct 5, 2024
1 parent 4d988a0 commit 022ab80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 9 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
exclude .*
prune .github
global-exclude *~

include README.rst
include LICENSE

graft uap-core
exclude uap-core/.*
recursive-exclude uap-core *.js

prune .github
prune uap-core/.github
global-exclude *~
global-exclude .*
global-exclude *.js
global-exclude __pycache__
global-exclude *.py[co]
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy"
]

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"ua_parser" = ["py.typed"]

[tool.ruff.lint]
select = ["F", "E", "W", "I", "RET", "RUF", "PT"]
ignore = [
Expand Down
Empty file added src/ua_parser/py.typed
Empty file.

0 comments on commit 022ab80

Please sign in to comment.