Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 3be03d7

Browse files
committed
Remove generic type
1 parent 607e4c8 commit 3be03d7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/openapi-json-schema-generator/src/main/resources/python/api_client.handlebars

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -812,16 +812,13 @@ class JSONDetector:
812812
return True
813813
return False
814814

815-
Response_T = typing.TypeVar("Response_T", bound=ApiResponse)
816-
817-
class OpenApiResponse(JSONDetector, typing.Generic[Response_T]):
818-
response_cls: typing.Type[Response_T]
819815

816+
class OpenApiResponse(JSONDetector):
820817
__filename_content_disposition_pattern = re.compile('filename="(.+?)"')
821818

822819
def __init__(
823820
self,
824-
response_cls: typing.Type[Response_T] = ApiResponse,
821+
response_cls: typing.Type[ApiResponse] = ApiResponse,
825822
content: typing.Optional[typing.Dict[str, MediaType]] = None,
826823
headers: typing.Optional[typing.List[HeaderParameter]] = None,
827824
):
@@ -906,7 +903,7 @@ class OpenApiResponse(JSONDetector, typing.Generic[Response_T]):
906903
for part in msg.get_payload()
907904
}
908905

909-
def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> Response_T:
906+
def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse:
910907
content_type = response.getheader('content-type')
911908
deserialized_body = unset
912909
streamed = response.supports_chunked_reads()

0 commit comments

Comments
 (0)