Jonathan Ballet cec5b8965a
python: type generated client using Self (#16693)
* python: type generated client using Self

This doesn't offer a clear win but this helps for:

* Using modern types and making the typing intent clearer
* Decreasing the need for `from __future__ import annotations`, since a
  class can now refer to itself without using its name
* Using more `cls` to automatically refer to the class, instead of
  respecifying the class name every time

Self is available from Python 3.11 and is provided in typing_extensions
(since 4.0.0) as a fallback for older versions

See: https://peps.python.org/pep-0673/
See: https://github.com/python/typing_extensions/blob/main/CHANGELOG.md#added-in-version-400

* generate code
2023-10-01 23:31:39 +08:00

52 lines
1.2 KiB
Python

# coding: utf-8
"""
Echo Server API
Echo Server API
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from setuptools import setup, find_packages # noqa: H301
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "openapi-client"
VERSION = "1.0.0"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
"python-dateutil",
"pydantic >= 2",
"typing-extensions >= 4.7.1",
]
setup(
name=NAME,
version=VERSION,
description="Echo Server API",
author="OpenAPI Generator community",
author_email="team@openapitools.org",
url="",
keywords=["OpenAPI", "OpenAPI-Generator", "Echo Server API"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
license="Apache 2.0",
long_description_content_type='text/markdown',
long_description="""\
Echo Server API
""", # noqa: E501
package_data={"openapi_client": ["py.typed"]},
)