Skip to content

Commit 29de2c9

Browse files
authored
Remove unused bool error (#704)
1 parent c1c27d4 commit 29de2c9

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

pydantic_core/core_schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,6 @@ def definition_reference_schema(
37723772
'get_attribute_error',
37733773
'model_class_type',
37743774
'none_required',
3775-
'bool',
37763775
'greater_than',
37773776
'greater_than_equal',
37783777
'less_than',

src/errors/types.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ pub enum ErrorType {
9898
// ---------------------
9999
// None errors
100100
NoneRequired,
101-
// boolean errors
102-
Bool,
103101
// ---------------------
104102
// generic comparison errors - used for all inequality comparisons except int and float which have their
105103
// own type, bounds arguments are Strings so they can be created from any type
@@ -471,7 +469,6 @@ impl ErrorType {
471469
Self::GetAttributeError {..} => "Error extracting attribute: {error}",
472470
Self::ModelClassType {..} => "Input should be an instance of {class_name}",
473471
Self::NoneRequired => "Input should be None",
474-
Self::Bool => "Input should be a valid boolean",
475472
Self::GreaterThan {..} => "Input should be greater than {gt}",
476473
Self::GreaterThanEqual {..} => "Input should be greater than or equal to {ge}",
477474
Self::LessThan {..} => "Input should be less than {lt}",

tests/test_errors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def f(input_value, info):
189189
('get_attribute_error', 'Error extracting attribute: foo', {'error': 'foo'}),
190190
('model_class_type', 'Input should be an instance of foo', {'class_name': 'foo'}),
191191
('none_required', 'Input should be None', None),
192-
('bool', 'Input should be a valid boolean', None),
193192
('greater_than', 'Input should be greater than 42.1', {'gt': 42.1}),
194193
('greater_than', 'Input should be greater than 42.1', {'gt': '42.1'}),
195194
('greater_than', 'Input should be greater than 2020-01-01', {'gt': '2020-01-01'}),

0 commit comments

Comments
 (0)