Skip to content

Commit 240aad8

Browse files
gs11wing328
authored andcommitted
Additional reserved python keywords (#7956)
1 parent 74fa941 commit 240aad8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlaskConnexionCodegen.java

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ public FlaskConnexionCodegen() {
7878
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
7979
"assert", "else", "if", "pass", "yield", "break", "except", "import",
8080
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
81-
"return", "def", "for", "lambda", "try", "self", "None", "True", "False", "nonlocal"));
81+
"return", "def", "for", "lambda", "try", "self", "None", "True", "False", "nonlocal",
82+
"float", "int", "str", "date", "datetime"));
8283

8384
// set the output folder here
8485
outputFolder = "generated-code/connexion";

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public PythonClientCodegen() {
107107
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
108108
"assert", "else", "if", "pass", "yield", "break", "except", "import",
109109
"print", "class", "exec", "in", "raise", "continue", "finally", "is",
110-
"return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", "False"));
110+
"return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", "nonlocal",
111+
"float", "int", "str", "date", "datetime"));
111112

112113
regexModifiers = new HashMap<Character, String>();
113114
regexModifiers.put('i', "IGNORECASE");

0 commit comments

Comments
 (0)