Skip to content

Commit

Permalink
fix (Azure#30680)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc authored Jun 12, 2023
1 parent ea403c4 commit ca0105e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tools/azure-sdk-tools/packaging_tools/multiapi_combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ def _get_names_by_api_version(api_version: str):
def _get_operation(code_model: "CodeModel", name: str) -> Operation:
return Operation(code_model, name, operation_group=self)

self.operations = _combine_helper(
self.operations = [o for o in _combine_helper(
code_model=self.code_model,
sorted_api_versions=api_versions,
get_cls=_get_operation,
get_names_by_api_version=_get_names_by_api_version,
)
) if o.name != "_api_version"]

def doc(self, async_mode: bool) -> str:
return strip_version_from_docs(self.generated_class(async_mode).__doc__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ class {{ operation_group.name }}{{ "(" + operation_group.name.replace("Operation
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
{% else %}
@property
def _api_version(self)-> str:
return self._get_api_version(None)
def _api_version(self, op_name: str) -> str:
return self._get_api_version(op_name)

{% endif %}
{% for operation in operation_group.operations %}
Expand Down

0 comments on commit ca0105e

Please sign in to comment.