From fa66ed866cd29fc86b287e855f087a7b7d538a37 Mon Sep 17 00:00:00 2001 From: Lucien Morey Date: Thu, 21 Nov 2024 15:43:05 +1100 Subject: [PATCH] add file marker for type checking (#1598) I think this is the correct way to do this based on my understanding of the guide to making a [pep561 compliant package](https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages) and this example in [black](https://github.com/psf/black/pull/1395/files). Given that I get all the type-checking info from a local installation, I don't know if this is testable until it's published on Pypi. resolves #1210 --- photon-lib/py/photonlibpy/py.typed | 1 + photon-lib/py/setup.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 photon-lib/py/photonlibpy/py.typed diff --git a/photon-lib/py/photonlibpy/py.typed b/photon-lib/py/photonlibpy/py.typed new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/photon-lib/py/photonlibpy/py.typed @@ -0,0 +1 @@ + diff --git a/photon-lib/py/setup.py b/photon-lib/py/setup.py index 21c7cf784..b72d1932c 100644 --- a/photon-lib/py/setup.py +++ b/photon-lib/py/setup.py @@ -55,6 +55,7 @@ descriptionStr = f"Pure-python implementation of PhotonLib for interfacing with setup( name="photonlibpy", packages=find_packages(), + package_data={"photonlibpy": ["py.typed"]}, version=versionString, install_requires=[ "numpy~=2.1",