diff --git a/setup.py b/setup.py index a25506b..763b2e6 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/http_helpers.py b/xivo/http_helpers.py index a21013b..43cf1d0 100644 --- a/xivo/http_helpers.py +++ b/xivo/http_helpers.py @@ -6,7 +6,7 @@ import json import re import time -from collections.abc import Iterable +from collections.abc import Iterable, MutableMapping from json.decoder import JSONDecodeError from logging import Logger from typing import TYPE_CHECKING, Any @@ -42,7 +42,7 @@ def __call__( return self.app(environ, start_response) -def reverse_proxy_fix_api_spec(api_spec: dict[str, Any]) -> None: +def reverse_proxy_fix_api_spec(api_spec: MutableMapping[str, Any]) -> None: prefix = request.headers.get('X-Script-Name') if prefix: api_spec['schemes'] = ['https'] diff --git a/xivo/py.typed b/xivo/py.typed new file mode 100644 index 0000000..e69de29