@@ -58,7 +58,7 @@ class Some(Generic[_T]):
58
58
59
59
@final
60
60
class SchemaValidator :
61
- def __init__ ( self , schema : CoreSchema , config : CoreConfig | None = None ) -> None : ...
61
+ def __new__ ( cls , schema : CoreSchema , config : CoreConfig | None = None ) -> Self : ...
62
62
@property
63
63
def title (self ) -> str : ...
64
64
def validate_python (
@@ -103,7 +103,7 @@ _IncEx: TypeAlias = set[int] | set[str] | dict[int, _IncEx] | dict[str, _IncEx]
103
103
104
104
@final
105
105
class SchemaSerializer :
106
- def __init__ ( self , schema : CoreSchema , config : CoreConfig | None = None ) -> None : ...
106
+ def __new__ ( cls , schema : CoreSchema , config : CoreConfig | None = None ) -> Self : ...
107
107
def to_python (
108
108
self ,
109
109
value : Any ,
@@ -164,7 +164,7 @@ def to_jsonable_python(
164
164
) -> Any : ...
165
165
166
166
class Url (SupportsAllComparisons ):
167
- def __init__ ( self , url : str ) -> None : ...
167
+ def __new__ ( cls , url : str ) -> Self : ...
168
168
@property
169
169
def scheme (self ) -> str : ...
170
170
@property
@@ -189,7 +189,7 @@ class Url(SupportsAllComparisons):
189
189
def __deepcopy__ (self , memo : dict ) -> str : ...
190
190
191
191
class MultiHostUrl (SupportsAllComparisons ):
192
- def __init__ ( self , url : str ) -> None : ...
192
+ def __new__ ( cls , url : str ) -> Self : ...
193
193
@property
194
194
def scheme (self ) -> str : ...
195
195
@property
@@ -233,9 +233,9 @@ class ValidationError(ValueError):
233
233
234
234
@final
235
235
class PydanticCustomError (ValueError ):
236
- def __init__ (
237
- self , error_type : LiteralString , message_template : LiteralString , context : dict [str , Any ] | None = None
238
- ) -> None : ...
236
+ def __new__ (
237
+ cls , error_type : LiteralString , message_template : LiteralString , context : dict [str , Any ] | None = None
238
+ ) -> Self : ...
239
239
@property
240
240
def context (self ) -> dict [str , Any ] | None : ...
241
241
@property
@@ -246,9 +246,9 @@ class PydanticCustomError(ValueError):
246
246
247
247
@final
248
248
class PydanticKnownError (ValueError ):
249
- def __init__ (
250
- self , error_type : ErrorType , context : dict [str , str | int | float | decimal .Decimal ] | None = None
251
- ) -> None : ...
249
+ def __new__ (
250
+ cls , error_type : ErrorType , context : dict [str , str | int | float | decimal .Decimal ] | None = None
251
+ ) -> Self : ...
252
252
@property
253
253
def context (self ) -> dict [str , str | int | float ] | None : ...
254
254
@property
@@ -259,23 +259,23 @@ class PydanticKnownError(ValueError):
259
259
260
260
@final
261
261
class PydanticOmit (Exception ):
262
- def __new__ (self ) -> PydanticOmit : ...
262
+ def __new__ (cls ) -> Self : ...
263
263
264
264
@final
265
265
class PydanticUseDefault (Exception ):
266
- def __new__ (self ) -> PydanticUseDefault : ...
266
+ def __new__ (cls ) -> Self : ...
267
267
268
268
@final
269
269
class PydanticSerializationError (ValueError ):
270
- def __init__ ( self , message : str ) -> None : ...
270
+ def __new__ ( cls , message : str ) -> Self : ...
271
271
272
272
@final
273
273
class PydanticSerializationUnexpectedValue (ValueError ):
274
- def __init__ ( self , message : str | None = None ) -> None : ...
274
+ def __new__ ( cls , message : str | None = None ) -> Self : ...
275
275
276
276
@final
277
277
class ArgsKwargs :
278
- def __init__ ( self , args : tuple [Any , ...], kwargs : dict [str , Any ] | None = None ) -> None : ...
278
+ def __new__ ( cls , args : tuple [Any , ...], kwargs : dict [str , Any ] | None = None ) -> Self : ...
279
279
@property
280
280
def args (self ) -> tuple [Any , ...]: ...
281
281
@property
0 commit comments