Skip to content

Commit a2ba23e

Browse files
authored
Update casing.py
1 parent 72a8b89 commit a2ba23e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/betterproto/casing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ def sanitize_name(value: str) -> str:
138138
# https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles
139139
if keyword.iskeyword(value):
140140
return f"{value}_"
141-
if value.isidentifier():
141+
if not value.isidentifier():
142142
return f"_{value}"
143143
return value

0 commit comments

Comments
 (0)