We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9abfd63 commit fd945aeCopy full SHA for fd945ae
src/openapi_python_generator/language_converters/python/common.py
@@ -49,8 +49,10 @@ def normalize_symbol(symbol: str) -> str:
49
:param symbol: name of the identifier
50
:return: normalized identifier name
51
"""
52
- symbol = symbol.replace("-", "_")
+ symbol = symbol.replace("-", "_").replace(" ", "_")
53
normalized_symbol = _symbol_ascii_strip_re.sub("", symbol)
54
if normalized_symbol in keyword.kwlist:
55
normalized_symbol = normalized_symbol + "_"
56
+ if len(normalized_symbol) > 0 and normalized_symbol[0].isnumeric():
57
+ normalized_symbol = "_" + normalized_symbol
58
return normalized_symbol
0 commit comments