Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
software-dov committed Sep 15, 2020
1 parent 7f1515c commit e904920
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gapic/schema/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import collections
import dataclasses
import keyword
import os
import sys
from typing import Callable, Container, Dict, FrozenSet, Mapping, Optional, Sequence, Set, Tuple
Expand Down Expand Up @@ -229,7 +230,7 @@ def disambiguate_keyword_fname(
visited_names: Container[str]) -> str:
path, fname = os.path.split(full_path)
name, ext = os.path.splitext(fname)
if name in RESERVED_NAMES or full_path in visited_names:
if name in keyword.kwlist or full_path in visited_names:
name += "_"
full_path = os.path.join(path, name + ext)
if full_path in visited_names:
Expand Down

0 comments on commit e904920

Please sign in to comment.