Skip to content

Commit

Permalink
Update connexion/decorators/parameter.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ruwann <ruwan.lambrichts@ml6.eu>
  • Loading branch information
daisieh and Ruwann authored Sep 13, 2021
1 parent bbde2b4 commit 594ecbc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions connexion/decorators/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ def snake_and_shadow(name):
:return:
"""
snake = inflection.underscore(name)
all_reserved = []
all_reserved.extend(list(builtins.__dict__.keys()))
all_reserved.extend(keyword.kwlist)
if snake in all_reserved:
if snake in builtins.__dict__ or keyword.iskeyword(snake):
return f"{snake}_"
return snake

Expand Down

0 comments on commit 594ecbc

Please sign in to comment.