Skip to content

Commit 8ed729f

Browse files
authored
fix: replace '-' in method names with '_' (#863)
1 parent ef6420a commit 8ed729f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

googleapiclient/discovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ def fix_method_name(name):
131131
name: string, method name.
132132
133133
Returns:
134-
The name with '_' appended if the name is a reserved word and '$'
134+
The name with '_' appended if the name is a reserved word and '$' and '-'
135135
replaced with '_'.
136136
"""
137-
name = name.replace("$", "_")
137+
name = name.replace("$", "_").replace("-", "_")
138138
if keyword.iskeyword(name) or name in RESERVED_WORDS:
139139
return name + "_"
140140
else:

0 commit comments

Comments
 (0)