[Python] fixes __setitem__ throwing an error for composed instance (#10197)

* adding a test for issues 10083

* commiting the generated files

* fix for the setattr issue

* commit generated files

Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com>
This commit is contained in:
Vikrant Balyan
2021-08-22 23:14:19 +05:30
committed by GitHub
parent bee8b615a5
commit f2e994271f
18 changed files with 415 additions and 0 deletions

View File

@@ -1479,6 +1479,9 @@ def is_valid_type(input_class_simple, valid_classes):
Returns:
bool
"""
if issubclass(input_class_simple, OpenApiModel) and \
valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,):
return True
valid_type = input_class_simple in valid_classes
if not valid_type and (
issubclass(input_class_simple, OpenApiModel) or