File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed
Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -1523,18 +1523,6 @@ def value_to_type(
15231523 # TODO(cretz): Want way to convert snake case to camel case?
15241524 return hint (** field_values )
15251525
1526- # If there is a @staticmethod or @classmethod parse_obj, we will use it.
1527- # This covers Pydantic models.
1528- parse_obj_attr = inspect .getattr_static (hint , "parse_obj" , None )
1529- if isinstance (parse_obj_attr , classmethod ) or isinstance (
1530- parse_obj_attr , staticmethod
1531- ):
1532- if not isinstance (value , dict ):
1533- raise TypeError (
1534- f"Cannot convert to { hint } , value is { type (value )} not dict"
1535- )
1536- return getattr (hint , "parse_obj" )(value )
1537-
15381526 # IntEnum
15391527 if inspect .isclass (hint ) and issubclass (hint , IntEnum ):
15401528 if not isinstance (value , int ):
You can’t perform that action at this time.
0 commit comments