Skip to content

Commit 7eedbbc

Browse files
authored
Enable mypy to discover type hints as specified in PEP 561 (#275)
1 parent 47aaf92 commit 7eedbbc

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ include tox.ini
1313

1414
include scripts/gql-cli
1515

16+
include gql/py.typed
17+
1618
recursive-include tests *.py *.graphql *.cnf *.yaml *.pem
1719
recursive-include docs *.txt *.rst conf.py Makefile make.bat *.jpg *.png *.gif
1820
recursive-include docs/code_examples *.py

gql/py.typed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Marker file for PEP 561. The gql package uses inline types.

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
],
8686
keywords="api graphql protocol rest relay gql client",
8787
packages=find_packages(include=["gql*"]),
88+
# PEP-561: https://www.python.org/dev/peps/pep-0561/
89+
package_data={"gql": ["py.typed"]},
8890
install_requires=install_requires,
8991
tests_require=install_all_requires + tests_requires,
9092
extras_require={

0 commit comments

Comments
 (0)