Skip to content

Commit

Permalink
fix: replace '-' in method names with '_'
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Apr 15, 2020
1 parent ef6420a commit 516cf25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googleapiclient/discovery.py
Expand Up @@ -131,10 +131,10 @@ def fix_method_name(name):
name: string, method name.
Returns:
The name with '_' appended if the name is a reserved word and '$'
The name with '_' appended if the name is a reserved word and '$' and '-'
replaced with '_'.
"""
name = name.replace("$", "_")
name = name.replace("$", "_").replace('-', '_')
if keyword.iskeyword(name) or name in RESERVED_WORDS:
return name + "_"
else:
Expand Down

0 comments on commit 516cf25

Please sign in to comment.