File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def __get_type(self) -> Type:
43
43
base_type = bool
44
44
elif self .type == "array" :
45
45
if self .items is None :
46
- raise Exception ("Unexpected value: type is 'list ' but items is None" )
46
+ raise ValueError ("Unexpected value: type is 'array ' but items is None" )
47
47
base_type = list [self .items .__get_type ()] # type: ignore
48
48
elif self .type == "object" :
49
49
if isinstance (self .AdditionalProperties , ParameterSchema ):
Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ def test_parameter_schema_array_no_items_error():
86
86
name = "bad_list" , type = "array" , description = "List without item type"
87
87
)
88
88
89
- expected_error_msg = "Unexpected value: type is 'list ' but items is None"
90
- with pytest .raises (Exception , match = expected_error_msg ):
89
+ expected_error_msg = "Unexpected value: type is 'array ' but items is None"
90
+ with pytest .raises (ValueError , match = expected_error_msg ):
91
91
schema ._ParameterSchema__get_type ()
92
92
93
- with pytest .raises (Exception , match = expected_error_msg ):
93
+ with pytest .raises (ValueError , match = expected_error_msg ):
94
94
schema .to_param ()
95
95
96
96
You can’t perform that action at this time.
0 commit comments