From f295c0144b1276c23e6b9b7ad512039d6996222a Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Tue, 1 Apr 2025 06:23:58 -0700 Subject: [PATCH] Let tools know this library supports type hints https://typing.python.org/en/latest/spec/distributing.html#packaging-type-information https://typing.python.org/en/latest/guides/libraries.html#marking-a-package-as-providing-type-information It turns out we need to add a py.typed file so that tools will know this library has type hints. As far as I can tell we don't need to do anything special to have our build tool (Hatch) include this file when it builds and packages the library. Signed-off-by: Nic Cope --- crossplane/function/py.typed | 0 pyproject.toml | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 crossplane/function/py.typed diff --git a/crossplane/function/py.typed b/crossplane/function/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index f023df4..9470c51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3.11", + "Typing :: Typed", ] dependencies = [ @@ -63,7 +64,7 @@ packages = ["crossplane"] # This special environment is used by hatch fmt. [tool.hatch.envs.hatch-static-analysis] dependencies = ["ruff==0.11.2"] -config-path = "none" # Disable Hatch's default Ruff config. +config-path = "none" # Disable Hatch's default Ruff config. [tool.ruff] target-version = "py311"