Skip to content

Commit

Permalink
chore: removing unused params from python model constructor (#597)
Browse files Browse the repository at this point in the history
# Fixes #

In python, the instancePathParams were not being used to initialize
response models in constructors. So removing those unused params.
  • Loading branch information
tiwarishubham635 authored Aug 2, 2024
1 parent 8d46672 commit d592313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/twilio-python/modelClasses.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:ivar {{name}}: {{{description}}}{{/vars}}
"""

def __init__(self, payload: Dict[str, Any]{{#instancePathParams}}, {{paramName}}: {{#if vendorExtensions.x-is-parent-param}}{{{contentType}}}{{else}}Optional[{{{contentType}}}] = None{{/if}}{{/instancePathParams}}):
def __init__(self, payload: Dict[str, Any]):

{{#vars}}
self.{{name}}: Optional[{{{dataType}}}] = {{#if vendorExtensions.x-deserialize}}{{vendorExtensions.x-deserialize}}(payload.get("{{{name}}}")){{else}}payload.get("{{{name}}}"){{/if}}{{/vars}}
Expand Down

0 comments on commit d592313

Please sign in to comment.