diff --git a/betterproto/casing.py b/betterproto/casing.py index 60ece6a..543df68 100644 --- a/betterproto/casing.py +++ b/betterproto/casing.py @@ -68,7 +68,9 @@ def snake_case(value: str, strict: bool = True): elif is_start: delimiter_count = len(symbols) elif word.isupper() or word.islower(): - delimiter_count = max(1, len(symbols)) # Preserve all delimiters if not strict. + delimiter_count = max( + 1, len(symbols) + ) # Preserve all delimiters if not strict. else: delimiter_count = len(symbols) + 1 # Extra underscore for leading capital.