File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -667,24 +667,22 @@ def is_type_any(schema: "SchemaType"):
667667 return schema .type is None
668668
669669 @staticmethod
670- def booleanTrue (schema : Optional [Union [ "SchemaType" , bool ] ]) -> bool :
670+ def booleanTrue (schema : Optional ["SchemaType" ]) -> bool :
671671 """
672672 ACCEPT all?
673673 :param schema:
674674 :return: True if Schema is {} or True or None
675675 """
676676 if schema is None :
677677 return True
678- if isinstance (schema , bool ):
679- return schema is True
680678 elif isinstance (schema , (SchemaBase , ReferenceBase )):
681679 """matches Any - {}"""
682680 return len (schema .model_fields_set ) == 0
683681 else :
684682 raise ValueError (schema )
685683
686684 @staticmethod
687- def booleanFalse (schema : Optional [Union [ "SchemaType" , bool ] ]) -> bool :
685+ def booleanFalse (schema : Optional ["SchemaType" ]) -> bool :
688686 """
689687 REJECT all?
690688 :param schema:
@@ -693,8 +691,6 @@ def booleanFalse(schema: Optional[Union["SchemaType", bool]]) -> bool:
693691
694692 if schema is None :
695693 return False
696- if isinstance (schema , bool ):
697- return schema is False
698694 elif isinstance (schema , (SchemaBase , ReferenceBase )):
699695 """match {'not':{}}"""
700696 return (v := getattr (schema , "not_" , False )) and Model .booleanTrue (v )
You can’t perform that action at this time.
0 commit comments