Skip to content
Permalink
Browse files
fix: replace '-' in method names with '_' (#863)
  • Loading branch information
busunkim96 committed Apr 17, 2020
1 parent ef6420a commit 8ed729f1d868a8713ab442bf0bf59e77ba36afb6
Showing with 2 additions and 2 deletions.
  1. +2 鈭2 googleapiclient/discovery.py
@@ -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:

0 comments on commit 8ed729f

Please sign in to comment.