-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'autorestv3' of https://github.com/Azure/autorest.python …
…into generated_code_mypy_fixes * 'autorestv3' of https://github.com/Azure/autorest.python: Update changelog (#539) Fix config async token credential (#536) Allows enums to have non-string values (#534) Fixing AlertsManagement generation (need to check if parent in yaml is of type object) (#533)
- Loading branch information
Showing
88 changed files
with
1,405 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
|
||
class {{ enum.enum_type }}(str, Enum): | ||
class {{ enum.name }}({{ enum.enum_type.type_annotation }}, Enum): | ||
{% if enum.description %} | ||
"""{{ enum.description | wordwrap(width=95, break_long_words=False, wrapstring='\n ') }} | ||
""" | ||
{% endif %} | ||
|
||
{% for value in enum.values %} | ||
{% if value.description %} | ||
{{ value.name }} = "{{ value.value }}" {{ "#: " + value.description }} | ||
{% else %} | ||
{{ value.name }} = "{{ value.value }}" | ||
{% endif %} | ||
{{ value.name }} = {{ enum.enum_type.get_declaration(value.value) }}{{ " #: " + value.description if value.description else "" }} | ||
{% endfor %} |
Oops, something went wrong.