From 1d4d197aa44cedd886d8196ee9206898acbba7bf Mon Sep 17 00:00:00 2001 From: Adrien Vannson Date: Sun, 27 Apr 2025 23:28:47 +0200 Subject: [PATCH] Sort __all__ --- src/betterproto2_compiler/plugin/compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/betterproto2_compiler/plugin/compiler.py b/src/betterproto2_compiler/plugin/compiler.py index 62f1658e..3957b998 100644 --- a/src/betterproto2_compiler/plugin/compiler.py +++ b/src/betterproto2_compiler/plugin/compiler.py @@ -51,9 +51,9 @@ def add_to_all(name: str) -> str: code = header_template.render(output_file=output_file, version=version, all=all) + "\n" + code try: - # Sort imports, delete unused ones + # Sort imports, delete unused ones, sort __all__ code = subprocess.check_output( - ["ruff", "check", "--select", "I,F401,TCH005", "--fix", "--silent", "-"], + ["ruff", "check", "--select", "I,F401,TC005,RUF022", "--fix", "--silent", "-"], input=code, encoding="utf-8", )