@@ -4147,61 +4147,6 @@ impl<'db> Type<'db> {
41474147 )
41484148 }
41494149
4150- KnownClass :: Str => {
4151- // ```py
4152- // class str(Sequence[str]):
4153- // @overload
4154- // def __new__(cls, object: object = ...) -> Self: ...
4155- // @overload
4156- // def __new__(cls, object: ReadableBuffer, encoding: str = ..., errors: str = ...) -> Self: ...
4157- // ```
4158- Some (
4159- CallableBinding :: from_overloads (
4160- self ,
4161- [
4162- Signature :: new (
4163- Parameters :: new (
4164- db,
4165- [ Parameter :: positional_or_keyword ( Name :: new_static ( "object" ) )
4166- . with_annotated_type ( Type :: object ( ) )
4167- . with_default_type ( Type :: string_literal ( db, "" ) ) ] ,
4168- ) ,
4169- KnownClass :: Str . to_instance ( db) ,
4170- ) ,
4171- Signature :: new (
4172- Parameters :: new (
4173- db,
4174- [
4175- Parameter :: positional_or_keyword ( Name :: new_static (
4176- "object" ,
4177- ) )
4178- // TODO: Should be `ReadableBuffer` instead of this union type:
4179- . with_annotated_type ( UnionType :: from_two_elements (
4180- db,
4181- KnownClass :: Bytes . to_instance ( db) ,
4182- KnownClass :: Bytearray . to_instance ( db) ,
4183- ) )
4184- . with_default_type ( Type :: bytes_literal ( db, b"" ) ) ,
4185- Parameter :: positional_or_keyword ( Name :: new_static (
4186- "encoding" ,
4187- ) )
4188- . with_annotated_type ( KnownClass :: Str . to_instance ( db) )
4189- . with_default_type ( Type :: string_literal ( db, "utf-8" ) ) ,
4190- Parameter :: positional_or_keyword ( Name :: new_static (
4191- "errors" ,
4192- ) )
4193- . with_annotated_type ( KnownClass :: Str . to_instance ( db) )
4194- . with_default_type ( Type :: string_literal ( db, "strict" ) ) ,
4195- ] ,
4196- ) ,
4197- KnownClass :: Str . to_instance ( db) ,
4198- ) ,
4199- ] ,
4200- )
4201- . into ( ) ,
4202- )
4203- }
4204-
42054150 KnownClass :: Object => {
42064151 // ```py
42074152 // class object:
@@ -4542,7 +4487,6 @@ impl<'db> Type<'db> {
45424487 known,
45434488 Some (
45444489 KnownClass :: Bool
4545- | KnownClass :: Str
45464490 | KnownClass :: Type
45474491 | KnownClass :: Object
45484492 | KnownClass :: Property
0 commit comments