add py.typed (#15804)

This commit is contained in:
William Cheng
2023-06-10 21:48:54 +08:00
committed by GitHub
parent fe2dde3708
commit 21748e024a
16 changed files with 16 additions and 4 deletions

View File

@@ -318,6 +318,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen implements Codege
supportingFiles.add(new SupportingFile("gitlab-ci.mustache", "", ".gitlab-ci.yml"));
supportingFiles.add(new SupportingFile("setup.mustache", "", "setup.py"));
supportingFiles.add(new SupportingFile("pyproject.mustache", "", "pyproject.toml"));
supportingFiles.add(new SupportingFile("py.typed.mustache", packagePath(), "py.typed"));
}
supportingFiles.add(new SupportingFile("configuration.mustache", packagePath(), "configuration.py"));
supportingFiles.add(new SupportingFile("__init__package.mustache", packagePath(), "__init__.py"));

View File

@@ -7,6 +7,7 @@ license = "{{{licenseInfo}}}{{^licenseInfo}}NoLicense{{/licenseInfo}}"
readme = "README.md"
repository = "https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}"
keywords = ["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"]
include = ["{{packageName}}/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"

View File

@@ -48,7 +48,8 @@ setup(
{{/licenseInfo}}long_description_content_type='text/markdown',
long_description="""\
{{appDescription}} # noqa: E501
"""
""",
package_data={"{{{packageName}}}": ["py.typed"]},
)
{{/-last}}
{{/apis}}

View File

@@ -45,6 +45,7 @@ openapi_client/models/string_enum_ref.py
openapi_client/models/tag.py
openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py
openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py
openapi_client/py.typed
openapi_client/rest.py
pyproject.toml
requirements.txt

View File

@@ -7,6 +7,7 @@ license = "Apache 2.0"
readme = "README.md"
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
include = ["openapi_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"

View File

@@ -46,5 +46,6 @@ setup(
long_description_content_type='text/markdown',
long_description="""\
Echo Server API # noqa: E501
"""
""",
package_data={"openapi_client": ["py.typed"]},
)

View File

@@ -165,6 +165,7 @@ petstore_api/models/special_name.py
petstore_api/models/tag.py
petstore_api/models/user.py
petstore_api/models/with_nested_one_of.py
petstore_api/py.typed
petstore_api/rest.py
petstore_api/signing.py
pyproject.toml

View File

@@ -7,6 +7,7 @@ license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
include = ["petstore_api/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"

View File

@@ -48,5 +48,6 @@ setup(
long_description_content_type='text/markdown',
long_description="""\
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
"""
""",
package_data={"petstore_api": ["py.typed"]},
)

View File

@@ -165,6 +165,7 @@ petstore_api/models/special_name.py
petstore_api/models/tag.py
petstore_api/models/user.py
petstore_api/models/with_nested_one_of.py
petstore_api/py.typed
petstore_api/rest.py
petstore_api/signing.py
pyproject.toml

View File

@@ -7,6 +7,7 @@ license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"]
include = ["petstore_api/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"

View File

@@ -47,5 +47,6 @@ setup(
long_description_content_type='text/markdown',
long_description="""\
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
"""
""",
package_data={"petstore_api": ["py.typed"]},
)