Skip to content

Commit

Permalink
Fix problem with __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienVannson committed Nov 8, 2024
1 parent 37cbbdd commit 016a566
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/betterproto/templates/header.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# This file has been @generated

__all__ = (
{%- for enum in output_file.enums -%}
{% for _, enum in output_file.enums|dictsort(by="key") %}
"{{ enum.py_name }}",
{%- endfor -%}
{%- for message in output_file.messages -%}
{% for _, message in output_file.messages|dictsort(by="key") %}
"{{ message.py_name }}",
{%- endfor -%}
{%- for service in output_file.services -%}
{% for _, service in output_file.services|dictsort(by="key") %}
"{{ service.py_name }}Stub",
"{{ service.py_name }}Base",
{%- endfor -%}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_all_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def test_all_definition():
"TestStub",
"TestBase",
)
assert enum.__all__ == ("Choice", "ArithmeticOperator", "Test")
assert enum.__all__ == ("ArithmeticOperator", "Choice", "Test")

0 comments on commit 016a566

Please sign in to comment.