@@ -206,9 +206,7 @@ def __gt__(self, other: object) -> bool:
206206 def __ge__ (self , other : object ) -> bool :
207207 return self ._impl_cmp_op (other , operator .ge )
208208
209- def sort (
210- self , key : Optional [Callable [[T ], U ]] = None , reverse : bool = False
211- ) -> None :
209+ def sort (self , key : Optional [Callable [[T ], U ]] = None , reverse : bool = False ) -> None :
212210 """Sort the elements in the set, as if calling list.sort"""
213211 self ._elements .sort (key = key , reverse = reverse )
214212
@@ -230,9 +228,7 @@ def __str__(self) -> str:
230228 return f"{{{ ', ' .join (map (repr , self ))} }}"
231229
232230 @classmethod
233- def __get_pydantic_core_schema__ (
234- cls , source_type : Any , handler : GetCoreSchemaHandler
235- ) -> core_schema .CoreSchema :
231+ def __get_pydantic_core_schema__ (cls , source_type : Any , handler : GetCoreSchemaHandler ) -> core_schema .CoreSchema :
236232 # See here: https://docs.pydantic.dev/latest/concepts/types/#generic-containers
237233 instance_schema = core_schema .is_instance_schema (cls )
238234
@@ -244,9 +240,7 @@ def __get_pydantic_core_schema__(
244240 else :
245241 sequence_t_schema = handler .generate_schema (Sequence )
246242
247- non_instance_schema = core_schema .no_info_after_validator_function (
248- OrderedSet , sequence_t_schema
249- )
243+ non_instance_schema = core_schema .no_info_after_validator_function (OrderedSet , sequence_t_schema )
250244 return core_schema .union_schema (
251245 [
252246 instance_schema ,
0 commit comments