Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit e904920

Browse files
committed
Fix
1 parent 7f1515c commit e904920

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gapic/schema/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import collections
2121
import dataclasses
22+
import keyword
2223
import os
2324
import sys
2425
from typing import Callable, Container, Dict, FrozenSet, Mapping, Optional, Sequence, Set, Tuple
@@ -229,7 +230,7 @@ def disambiguate_keyword_fname(
229230
visited_names: Container[str]) -> str:
230231
path, fname = os.path.split(full_path)
231232
name, ext = os.path.splitext(fname)
232-
if name in RESERVED_NAMES or full_path in visited_names:
233+
if name in keyword.kwlist or full_path in visited_names:
233234
name += "_"
234235
full_path = os.path.join(path, name + ext)
235236
if full_path in visited_names:

0 commit comments

Comments
 (0)