Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Silences line too long error for python models so CI tests pass
  • Loading branch information
spacether committed Oct 16, 2019
commit 9ce5a7f5bbd96db23db6f2e32cd0dbaefcd3e510
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class {{classname}}(object):
allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
{{#isListContainer}}
if (self.local_vars_configuration.client_side_validation and
not set({{{name}}}).issubset(set(allowed_values))):
not set({{{name}}}).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set({{{name}}}) - set(allowed_values))), # noqa: E501
Expand All @@ -124,7 +124,7 @@ class {{classname}}(object):
{{/isListContainer}}
{{#isMapContainer}}
if (self.local_vars_configuration.client_side_validation and
not set({{{name}}}.keys()).issubset(set(allowed_values))):
not set({{{name}}}.keys()).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set({{{name}}}.keys()) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def array_enum(self, array_enum):
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(array_enum).issubset(set(allowed_values))):
not set(array_enum).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string):
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(map_of_enum_string.keys()).issubset(set(allowed_values))):
not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-asyncio/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
certifi >= 14.05.14
future; python_version<="2.7"
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def array_enum(self, array_enum):
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(array_enum).issubset(set(allowed_values))):
not set(array_enum).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string):
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(map_of_enum_string.keys()).issubset(set(allowed_values))):
not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python-tornado/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
certifi >= 14.05.14
future; python_version<="2.7"
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def array_enum(self, array_enum):
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(array_enum).issubset(set(allowed_values))):
not set(array_enum).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string):
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(map_of_enum_string.keys()).issubset(set(allowed_values))):
not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
certifi >= 14.05.14
future; python_version<="2.7"
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def array_enum(self, array_enum):
"""
allowed_values = ["fish", "crab"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(array_enum).issubset(set(allowed_values))):
not set(array_enum).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def enum_form_string_array(self, enum_form_string_array):
"""
allowed_values = [">", "$"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(enum_form_string_array).issubset(set(allowed_values))):
not set(enum_form_string_array).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid values for `enum_form_string_array` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(enum_form_string_array) - set(allowed_values))), # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def map_of_enum_string(self, map_of_enum_string):
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if (self.local_vars_configuration.client_side_validation and
not set(map_of_enum_string.keys()).issubset(set(allowed_values))):
not set(map_of_enum_string.keys()).issubset(set(allowed_values))): # noqa: E501
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
Expand Down
1 change: 1 addition & 0 deletions samples/openapi3/client/petstore/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
certifi >= 14.05.14
future; python_version<="2.7"
six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
Expand Down