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.
[0] ==
startswith
1 parent 04c997e commit da22888Copy full SHA for da22888
openapi_python_client/utils.py
@@ -12,7 +12,7 @@ class PythonIdentifier(str):
12
def __new__(cls, value: str, prefix: str) -> "PythonIdentifier":
13
new_value = fix_reserved_words(snake_case(sanitize(value)))
14
15
- if not new_value.isidentifier() or value[0] == "_":
+ if not new_value.isidentifier() or value.startswith("_"):
16
new_value = f"{prefix}{new_value}"
17
return str.__new__(cls, new_value)
18
0 commit comments