Skip to content

Commit d971f0e

Browse files
[python] fix #8404: avoid shadowing the name Endpoint (#8405)
if a type was named Endpoint, its import for use in the api would shadow the name Endpoint for the internal utility
1 parent 4e8a38d commit d971f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.generator/templates/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re # noqa: F401
44
import sys # noqa: F401
55

6-
from {{packageName}}.api_client import ApiClient, Endpoint
6+
from {{packageName}}.api_client import ApiClient, Endpoint as _Endpoint
77
from {{packageName}}.model_utils import ( # noqa: F401
88
check_allowed_values,
99
check_validations,
@@ -125,7 +125,7 @@ class {{classname}}(object):
125125
{{/requiredParams}}
126126
return self.call_with_http_info(**kwargs)
127127

128-
self.{{operationId}} = Endpoint(
128+
self.{{operationId}} = _Endpoint(
129129
settings={
130130
'response_type': {{#returnType}}({{{returnType}}},){{/returnType}}{{^returnType}}None{{/returnType}},
131131
{{#authMethods}}

0 commit comments

Comments
 (0)