We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17ce589 commit 6a9470dCopy full SHA for 6a9470d
1 file changed
betterproto2_compiler/src/betterproto2_compiler/plugin/models.py
@@ -636,13 +636,11 @@ def __post_init__(self) -> None:
636
# Find the potential common prefix
637
enum_prefix: str | None = None
638
for i in range(len(first_entry)):
639
- if first_entry[:i+1].replace("_", "").lower() == enum_name_reduced:
640
- enum_prefix = f"{first_entry[:i+1]}_"
+ if first_entry[: i + 1].replace("_", "").lower() == enum_name_reduced:
+ enum_prefix = f"{first_entry[: i + 1]}_"
641
break
642
643
- should_rename = enum_prefix and all(
644
- entry.name.startswith(enum_prefix) for entry in self.entries
645
- )
+ should_rename = enum_prefix and all(entry.name.startswith(enum_prefix) for entry in self.entries)
646
647
if should_rename:
648
for entry in self.entries:
0 commit comments