From 51f7d9b41c673ae35a06f3aac832b4dbe3ce6971 Mon Sep 17 00:00:00 2001 From: Charles Langlois Date: Fri, 9 Aug 2024 14:43:40 -0400 Subject: [PATCH] Adding py.typed sentinel file to support type checking https://typing.readthedocs.io/en/latest/guides/libraries.html#marking-a-package-as-providing-type-information a sentinel file must be present and distributed in package to signal to type checkers that the library provides type information that can be used; otherwise imports from this library are considered untyped. --- setup.py | 3 ++- xivo/py.typed | 0 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 xivo/py.typed diff --git a/setup.py b/setup.py index a25506b2..763b2e6c 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2007-2023 The Wazo Authors (see the AUTHORS file) +# Copyright 2007-2024 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later from setuptools import find_packages, setup @@ -12,4 +12,5 @@ author_email='dev@wazo.community', url='http://wazo.community', packages=find_packages(), + package_data={'xivo': ['py.typed']}, ) diff --git a/xivo/py.typed b/xivo/py.typed new file mode 100644 index 00000000..e69de29b