id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
14,200
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.PyObjectError
class PyObjectError(PydanticTypeError): msg_template = 'ensure this value contains valid import path or valid callable: {error_message}'
class PyObjectError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,201
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.PydanticErrorMixin
from typing import TYPE_CHECKING, Any, Callable, Sequence, Set, Tuple, Type, Union class PydanticErrorMixin: code: str msg_template: str def __init__(self, **ctx: Any) -> None: self.__dict__ = ctx def __str__(self) -> str: return self.msg_template.format(**self.__dict__) def __re...
class PydanticErrorMixin: def __init__(self, **ctx: Any) -> None: pass def __str__(self) -> str: pass def __reduce__(self) -> Tuple[Callable[..., 'PydanticErrorMixin'], Tuple[Type['PydanticErrorMixin'], 'DictStrAny']]: pass
4
0
2
0
2
0
1
0
0
3
0
2
3
1
3
3
12
3
9
5
5
0
9
5
5
1
0
0
3
14,202
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.PydanticTypeError
class PydanticTypeError(PydanticErrorMixin, TypeError): pass
class PydanticTypeError(PydanticErrorMixin, TypeError): pass
1
0
0
0
0
0
0
0
2
0
0
30
0
0
0
14
2
0
2
1
1
0
2
1
1
0
4
0
0
14,203
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.PydanticValueError
class PydanticValueError(PydanticErrorMixin, ValueError): pass
class PydanticValueError(PydanticErrorMixin, ValueError): pass
1
0
0
0
0
0
0
0
2
0
0
51
0
0
0
14
2
0
2
1
1
0
2
1
1
0
4
0
0
14,204
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.SequenceError
class SequenceError(PydanticTypeError): msg_template = 'value is not a valid sequence'
class SequenceError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,205
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.SetError
class SetError(PydanticTypeError): msg_template = 'value is not a valid set'
class SetError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,206
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.SetMaxLengthError
class SetMaxLengthError(PydanticValueError): code = 'set.max_items' msg_template = 'ensure this value has at most {limit_value} items' def __init__(self, *, limit_value: int) -> None: super().__init__(limit_value=limit_value)
class SetMaxLengthError(PydanticValueError): def __init__(self, *, limit_value: int) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,207
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.SetMinLengthError
class SetMinLengthError(PydanticValueError): code = 'set.min_items' msg_template = 'ensure this value has at least {limit_value} items' def __init__(self, *, limit_value: int) -> None: super().__init__(limit_value=limit_value)
class SetMinLengthError(PydanticValueError): def __init__(self, *, limit_value: int) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,208
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.StrError
class StrError(PydanticTypeError): msg_template = 'str type expected'
class StrError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,209
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.StrRegexError
class StrRegexError(PydanticValueError): code = 'str.regex' msg_template = 'string does not match regex "{pattern}"' def __init__(self, *, pattern: str) -> None: super().__init__(pattern=pattern)
class StrRegexError(PydanticValueError): def __init__(self, *, pattern: str) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,210
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.StrictBoolError
class StrictBoolError(PydanticValueError): msg_template = 'value is not a valid boolean'
class StrictBoolError(PydanticValueError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,211
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.SubclassError
from typing import TYPE_CHECKING, Any, Callable, Sequence, Set, Tuple, Type, Union from pydantic.v1.typing import display_as_type class SubclassError(PydanticTypeError): code = 'subclass' msg_template = 'subclass of {expected_class} expected' def __init__(self, *, expected_class: Type[Any]) -> None: ...
class SubclassError(PydanticTypeError): def __init__(self, *, expected_class: Type[Any]) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,212
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.TimeError
class TimeError(PydanticValueError): msg_template = 'invalid time format'
class TimeError(PydanticValueError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,213
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.TupleError
class TupleError(PydanticTypeError): msg_template = 'value is not a valid tuple'
class TupleError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,214
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.TupleLengthError
class TupleLengthError(PydanticValueError): code = 'tuple.length' msg_template = 'wrong tuple length {actual_length}, expected {expected_length}' def __init__(self, *, actual_length: int, expected_length: int) -> None: super().__init__(actual_length=actual_length, expected_length=expected_length)
class TupleLengthError(PydanticValueError): def __init__(self, *, actual_length: int, expected_length: int) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,215
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UUIDError
class UUIDError(PydanticTypeError): msg_template = 'value is not a valid uuid'
class UUIDError(PydanticTypeError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,216
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UUIDVersionError
class UUIDVersionError(PydanticValueError): code = 'uuid.version' msg_template = 'uuid version {required_version} expected' def __init__(self, *, required_version: int) -> None: super().__init__(required_version=required_version)
class UUIDVersionError(PydanticValueError): def __init__(self, *, required_version: int) -> None: pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
5
0
1
14,217
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlError
class UrlError(PydanticValueError): code = 'url'
class UrlError(PydanticValueError): pass
1
0
0
0
0
0
0
0
1
0
0
7
0
0
0
14
2
0
2
2
1
0
2
2
1
0
5
0
0
14,218
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlExtraError
class UrlExtraError(UrlError): code = 'url.extra' msg_template = 'URL invalid, extra characters found after valid URL: {extra!r}'
class UrlExtraError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,219
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlHostError
class UrlHostError(UrlError): code = 'url.host' msg_template = 'URL host invalid'
class UrlHostError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,220
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlHostTldError
class UrlHostTldError(UrlError): code = 'url.host' msg_template = 'URL host invalid, top level domain required'
class UrlHostTldError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,221
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlPortError
class UrlPortError(UrlError): code = 'url.port' msg_template = 'URL port invalid, port cannot exceed 65535'
class UrlPortError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,222
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlSchemeError
class UrlSchemeError(UrlError): code = 'url.scheme' msg_template = 'invalid or missing URL scheme'
class UrlSchemeError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,223
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlSchemePermittedError
from typing import TYPE_CHECKING, Any, Callable, Sequence, Set, Tuple, Type, Union class UrlSchemePermittedError(UrlError): code = 'url.scheme' msg_template = 'URL scheme not permitted' def __init__(self, allowed_schemes: Set[str]): super().__init__(allowed_schemes=allowed_schemes)
class UrlSchemePermittedError(UrlError): def __init__(self, allowed_schemes: Set[str]): pass
2
0
2
0
2
0
1
0
1
2
0
0
1
0
1
15
6
1
5
4
3
0
5
4
3
1
6
0
1
14,224
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.UrlUserInfoError
class UrlUserInfoError(UrlError): code = 'url.userinfo' msg_template = 'userinfo required in URL but missing'
class UrlUserInfoError(UrlError): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
14
3
0
3
3
2
0
3
3
2
0
6
0
0
14,225
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors.WrongConstantError
class WrongConstantError(PydanticValueError): code = 'const' def __str__(self) -> str: permitted = ', '.join((repr(v) for v in self.permitted)) return f'unexpected value; permitted: {permitted}'
class WrongConstantError(PydanticValueError): def __str__(self) -> str: pass
2
0
3
0
3
1
1
0.2
1
1
0
0
1
0
1
15
6
1
5
4
3
1
5
4
3
1
5
0
1
14,226
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors._NumberBoundError
from typing import TYPE_CHECKING, Any, Callable, Sequence, Set, Tuple, Type, Union from decimal import Decimal class _NumberBoundError(PydanticValueError): def __init__(self, *, limit_value: Union[int, float, Decimal]) -> None: super().__init__(limit_value=limit_value)
class _NumberBoundError(PydanticValueError): def __init__(self, *, limit_value: Union[int, float, Decimal]) -> None: pass
2
0
2
0
2
0
1
0
1
4
0
4
1
0
1
15
3
0
3
2
1
0
3
2
1
1
5
0
1
14,227
samuelcolvin/pydantic
pydantic/v1/errors.py
pydantic.v1.errors._PathValueError
from pathlib import Path class _PathValueError(PydanticValueError): def __init__(self, *, path: Path) -> None: super().__init__(path=str(path))
class _PathValueError(PydanticValueError): def __init__(self, *, path: Path) -> None: pass
2
0
2
0
2
0
1
0
1
3
0
3
1
0
1
15
3
0
3
2
1
0
3
2
1
1
5
0
1
14,228
samuelcolvin/pydantic
pydantic/v1/fields.py
pydantic.v1.fields.DeferredType
class DeferredType: """ Used to postpone field preparation, while creating recursive generic models. """
class DeferredType: ''' Used to postpone field preparation, while creating recursive generic models. ''' pass
1
1
0
0
0
0
0
3
0
0
0
0
0
0
0
0
4
0
1
1
0
3
1
1
0
0
0
0
0
14,229
samuelcolvin/pydantic
pydantic/v1/fields.py
pydantic.v1.fields.FieldInfo
from pydantic.v1.utils import PyObjectStr, Representation, ValueItems, get_discriminator_alias_and_values, get_unique_discriminator_alias, lenient_isinstance, lenient_issubclass, sequence_like, smart_deepcopy from typing import TYPE_CHECKING, Any, Counter, DefaultDict, Deque, Dict, ForwardRef, FrozenSet, Generator, Ite...
class FieldInfo(Representation): ''' Captures extra information about a field. ''' def __init__(self, default: Any=Undefined, **kwargs: Any) -> None: pass def __repr_args__(self) -> 'ReprArgs': pass def get_constraints(self) -> Set[str]: ''' Gets the constrain...
6
3
13
0
11
2
2
0.13
1
5
0
0
5
27
5
12
122
9
100
40
94
13
51
39
45
6
1
3
12
14,230
samuelcolvin/pydantic
pydantic/v1/fields.py
pydantic.v1.fields.ModelField
from pydantic.v1 import errors as errors_ from collections.abc import Callable, Hashable as CollectionsHashable, Iterable as CollectionsIterable from pydantic.v1.error_wrappers import ErrorWrapper from pydantic.v1.typing import NoArgAnyCallable, convert_generics, display_as_type, get_args, get_origin, is_finalvar, is_l...
class ModelField(Representation): def __init__(self, *, name: str, type_: Type[Any], class_validators: Optional[Dict[str, Validator]], model_config: Type['BaseConfig'], default: Any=None, default_factory: Optional[NoArgAnyCallable]=None, required: 'BoolUndefined'=Undefined, final: bool=False, alias: Optional[str]...
28
9
33
3
26
4
8
0.15
1
45
2
0
22
25
24
31
838
94
659
153
590
99
463
109
436
45
1
6
183
14,231
samuelcolvin/pydantic
pydantic/v1/fields.py
pydantic.v1.fields.ModelPrivateAttr
from pydantic.v1.typing import NoArgAnyCallable, convert_generics, display_as_type, get_args, get_origin, is_finalvar, is_literal_type, is_new_type, is_none_type, is_typeddict, is_typeddict_special, is_union, new_type_supertype from pydantic.v1.utils import PyObjectStr, Representation, ValueItems, get_discriminator_ali...
class ModelPrivateAttr(Representation): def __init__(self, default: Any=Undefined, *, default_factory: Optional[NoArgAnyCallable]=None) -> None: pass def get_default(self) -> Any: pass def __eq__(self, other: Any) -> bool: pass
4
0
3
0
3
0
1
0
1
2
0
0
3
2
3
10
15
3
12
7
8
0
9
7
5
2
1
0
4
14,232
samuelcolvin/pydantic
pydantic/v1/fields.py
pydantic.v1.fields.UndefinedType
from typing import TYPE_CHECKING, Any, Counter, DefaultDict, Deque, Dict, ForwardRef, FrozenSet, Generator, Iterable, Iterator, List, Mapping, Optional, Pattern, Sequence, Set, Tuple, Type, TypeVar, Union class UndefinedType: def __repr__(self) -> str: return 'PydanticUndefined' def __copy__(self: T)...
class UndefinedType: def __repr__(self) -> str: pass def __copy__(self: T) -> T: pass def __reduce__(self) -> str: pass def __deepcopy__(self: T, _: Any) -> T: pass
5
0
2
0
2
0
1
0
0
2
0
0
4
0
4
4
12
3
9
5
4
0
9
5
4
1
0
0
4
14,233
samuelcolvin/pydantic
pydantic/v1/generics.py
pydantic.v1.generics.GenericModel
from pydantic.v1.class_validators import gather_all_validators from pydantic.v1.utils import all_identical, lenient_issubclass from pydantic.v1.main import BaseModel, create_model from typing import TYPE_CHECKING, Any, ClassVar, Dict, ForwardRef, Generic, Iterator, List, Mapping, Optional, Tuple, Type, TypeVar, Union, ...
class GenericModel(BaseModel): def __class_getitem__(cls: Type[GenericModelT], params: Union[Type[Any], Tuple[Type[Any], ...]]) -> Type[Any]: '''Instantiates a new class from a generic class `cls` and type variables `params`. :param params: Tuple of types the class . Given a generic class ...
8
3
37
5
20
13
4
0.72
1
9
0
0
1
0
3
53
185
28
94
32
84
68
71
28
65
11
5
3
22
14,234
samuelcolvin/pydantic
pydantic/v1/main.py
pydantic.v1.main.BaseModel
from pydantic.v1.schema import default_ref_template, model_schema from pydantic.v1.json import custom_pydantic_encoder, pydantic_encoder from pydantic.v1.config import BaseConfig, Extra, inherit_config, prepare_config from pydantic.v1.utils import DUNDER_ATTRIBUTES, ROOT_KEY, ClassAttribute, GetterDict, Representation,...
class BaseModel(Representation, metaclass=ModelMetaclass): def __init__(__pydantic_self__, **data: Any) -> None: ''' Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. ''' ...
45
8
19
1
16
2
4
0.12
2
23
0
0
14
0
28
57
607
69
483
178
364
58
265
84
235
15
4
3
104
14,235
samuelcolvin/pydantic
pydantic/v1/main.py
pydantic.v1.main.ModelMetaclass
from abc import ABCMeta from pydantic.v1.config import BaseConfig, Extra, inherit_config, prepare_config from pydantic.v1.json import custom_pydantic_encoder, pydantic_encoder from pydantic.v1.types import PyObject, StrBytes from functools import partial from pydantic.v1.class_validators import ValidatorGroup, extract_...
@dataclass_transform(kw_only_default=True, field_specifiers=(Field,)) class ModelMetaclass(ABCMeta): @no_type_check def __new__(mcs, name, bases, namespace, **kwargs): pass def is_untouched(v: Any) -> bool: pass def __instancecheck__(self, instance: Any) -> bool: '...
6
1
61
6
52
4
10
0.08
1
19
1
1
2
0
2
22
184
18
157
38
152
12
93
37
89
29
3
5
31
14,236
samuelcolvin/pydantic
pydantic/v1/mypy.py
pydantic.v1.mypy.ModelConfigData
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type as TypingType, Union class ModelConfigData: def __init__(self, forbid_extra: Optional[bool]=None, allow_mutation: Optional[bool]=None, frozen: Optional[bool]=None, orm_mode: Optional[bool]=None, allow_population_by_field_name: Optional[bool]...
class ModelConfigData: def __init__(self, forbid_extra: Optional[bool]=None, allow_mutation: Optional[bool]=None, frozen: Optional[bool]=None, orm_mode: Optional[bool]=None, allow_population_by_field_name: Optional[bool]=None, has_alias_generator: Optional[bool]=None): pass def set_values_dict(self) ...
5
0
6
0
6
0
2
0
0
3
0
0
4
6
4
4
29
3
26
20
13
0
18
12
13
3
0
1
7
14,237
samuelcolvin/pydantic
pydantic/v1/mypy.py
pydantic.v1.mypy.PydanticModelField
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type as TypingType, Union from mypy.nodes import ARG_NAMED, ARG_NAMED_OPT, ARG_OPT, ARG_POS, ARG_STAR2, MDEF, Argument, AssignmentStmt, Block, CallExpr, ClassDef, Context, Decorator, EllipsisExpr, FuncBase, FuncDef, JsonDict, MemberExpr, NameExpr, Pass...
class PydanticModelField: def __init__(self, name: str, is_required: bool, alias: Optional[str], has_dynamic_alias: bool, line: int, column: int): pass def to_var(self, info: TypeInfo, use_alias: bool) -> Var: pass def to_argument(self, info: TypeInfo, typed: bool, force_optional: bool, ...
7
0
6
0
6
0
2
0
0
3
0
0
4
6
5
5
35
4
31
17
22
0
22
14
16
3
0
1
8
14,238
samuelcolvin/pydantic
pydantic/v1/mypy.py
pydantic.v1.mypy.PydanticModelTransformer
from mypy.types import AnyType, CallableType, Instance, NoneType, Overloaded, ProperType, Type, TypeOfAny, TypeType, TypeVarId, TypeVarType, UnionType, get_proper_type from mypy.plugin import CheckerPluginInterface, ClassDefContext, FunctionContext, MethodContext, Plugin, ReportConfigContext, SemanticAnalyzerPluginInte...
class PydanticModelTransformer: def __init__(self, ctx: ClassDefContext, plugin_config: PydanticPluginConfig) -> None: pass def transform(self) -> None: ''' Configures the BaseModel subclass according to the plugin settings. In particular: * determines the model config...
20
14
27
2
19
7
5
0.34
0
9
3
0
11
2
15
15
429
42
297
90
275
102
214
84
198
14
0
4
77
14,239
samuelcolvin/pydantic
pydantic/v1/mypy.py
pydantic.v1.mypy.PydanticPlugin
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type as TypingType, Union from mypy.plugin import CheckerPluginInterface, ClassDefContext, FunctionContext, MethodContext, Plugin, ReportConfigContext, SemanticAnalyzerPluginInterface from mypy.options import Options from mypy.types import AnyType, Cal...
class PydanticPlugin(Plugin): def __init__(self, options: Options) -> None: pass def get_base_class_hook(self, fullname: str) -> 'Optional[Callable[[ClassDefContext], None]]': pass def get_metaclass_hook(self, fullname: str) -> Optional[Callable[[ClassDefContext], None]]: pass ...
11
4
11
1
7
3
3
0.43
1
7
2
0
10
2
10
10
115
21
69
26
58
30
67
25
56
10
1
4
27
14,240
samuelcolvin/pydantic
pydantic/v1/mypy.py
pydantic.v1.mypy.PydanticPluginConfig
from configparser import ConfigParser from mypy.options import Options from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type as TypingType, Union class PydanticPluginConfig: __slots__ = ('init_forbid_extra', 'init_typed', 'warn_required_dynamic_aliases', 'warn_untyped_fields', 'debug_dataclass_t...
class PydanticPluginConfig: def __init__(self, options: Options) -> None: pass def to_data(self) -> Dict[str, Any]: pass
3
0
10
1
10
1
4
0.06
0
5
0
0
2
0
2
2
35
3
32
9
29
2
25
9
22
6
0
3
7
14,241
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.AmqpDsn
class AmqpDsn(AnyUrl): allowed_schemes = {'amqp', 'amqps'} host_required = False
class AmqpDsn(AnyUrl): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
80
3
0
3
3
2
0
3
3
2
0
3
0
0
14,242
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.AnyHttpUrl
class AnyHttpUrl(AnyUrl): allowed_schemes = {'http', 'https'} __slots__ = ()
class AnyHttpUrl(AnyUrl): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
80
4
1
3
3
2
0
3
3
2
0
3
0
0
14,243
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.AnyUrl
from pydantic.v1.utils import Representation, update_not_none from pydantic.v1 import errors from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check from pydantic.v1.validators import constr_length_validator, str_validator class A...
null
27
2
14
1
12
1
3
0.08
1
13
1
8
3
10
14
80
226
30
187
88
134
15
125
50
110
13
2
3
45
14,244
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.CockroachDsn
class CockroachDsn(AnyUrl): allowed_schemes = {'cockroachdb', 'cockroachdb+psycopg2', 'cockroachdb+asyncpg'} user_required = True
class CockroachDsn(AnyUrl): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
80
7
0
7
3
6
0
3
3
2
0
3
0
0
14,245
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.EmailStr
from pydantic.v1.validators import constr_length_validator, str_validator from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check class EmailStr(str): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) ...
class EmailStr(str): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Union[str]) -> str: pass
7
0
3
0
3
0
1
0.08
1
1
0
0
0
0
3
69
16
3
12
7
5
1
9
4
5
1
2
0
3
14,246
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.FileUrl
class FileUrl(AnyUrl): allowed_schemes = {'file'} host_required = False __slots__ = ()
class FileUrl(AnyUrl): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
80
5
1
4
4
3
0
4
4
3
0
3
0
0
14,247
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.HttpUrl
class HttpUrl(AnyHttpUrl): tld_required = True max_length = 2083 hidden_parts = {'port'} @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': return {'port': '80' if parts['scheme'] == 'http' else '443'}
class HttpUrl(AnyHttpUrl): @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': pass
3
0
2
0
2
0
2
0.14
1
0
0
0
0
0
1
81
9
1
7
6
4
1
6
5
4
2
4
0
2
14,248
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.IPvAnyAddress
from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network, _BaseAddress, _BaseNetwork from pydantic.v1 import errors class IPvAny...
class IPvAnyAddress(_BaseAddress): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Union[str, bytes, int]) -> Union[IPv4Address, IPv6A...
7
0
5
0
4
0
2
0
1
8
0
0
0
0
3
27
22
4
18
8
11
0
15
5
11
3
2
1
5
14,249
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.IPvAnyInterface
from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check from pydantic.v1 import errors from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network, _BaseAddress, _BaseNetwork class IPvAny...
class IPvAnyInterface(_BaseAddress): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: NetworkType) -> Union[IPv4Interface, IPv6Interfac...
7
0
5
0
4
0
2
0
1
6
0
0
0
0
3
27
22
4
18
8
11
0
15
5
11
3
2
1
5
14,250
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.IPvAnyNetwork
from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network, _BaseAddress, _BaseNetwork from pydantic.v1 import errors class IPvAny...
class IPvAnyNetwork(_BaseNetwork): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: NetworkType) -> Union[IPv4Network, IPv6Network]: ...
7
0
5
0
4
1
2
0.18
1
6
0
0
0
0
3
49
22
3
17
7
10
3
14
4
10
3
2
1
5
14,251
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.KafkaDsn
class KafkaDsn(AnyUrl): allowed_schemes = {'kafka'} @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': return {'domain': 'localhost', 'port': '9092'}
class KafkaDsn(AnyUrl): @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': pass
3
0
5
0
5
0
1
0
1
0
0
0
0
0
1
81
9
1
8
4
5
0
4
3
2
1
3
0
1
14,252
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.MongoDsn
class MongoDsn(AnyUrl): allowed_schemes = {'mongodb'} @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': return {'port': '27017'}
class MongoDsn(AnyUrl): @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': pass
3
0
4
0
4
0
1
0.14
1
0
0
0
0
0
1
81
9
1
7
4
4
1
4
3
2
1
3
0
1
14,253
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.MultiHostDsn
from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check class MultiHostDsn(AnyUrl): __slots__ = AnyUrl.__slots__ + ('hosts',) def __init__(self, *args: Any, hosts: Optional[List['HostParts']]=None, **kwargs: Any): ...
class MultiHostDsn(AnyUrl): def __init__(self, *args: Any, hosts: Optional[List['HostParts']]=None, **kwargs: Any): pass @staticmethod def _match_url(url: str) -> Optional[Match[str]]: pass @classmethod def validate_parts(cls, parts: 'Parts', validate_port: bool=True) -> 'Parts': ...
8
0
13
0
13
1
2
0.04
1
4
1
1
1
1
4
84
62
5
56
17
48
2
22
14
17
5
3
1
8
14,254
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.NameEmail
from typing import TYPE_CHECKING, Any, Collection, Dict, Generator, List, Match, Optional, Pattern, Set, Tuple, Type, Union, cast, no_type_check from pydantic.v1.validators import constr_length_validator, str_validator from pydantic.v1.utils import Representation, update_not_none class NameEmail(Representation): _...
class NameEmail(Representation): def __init__(self, name: str, email: str): pass def __eq__(self, other: Any) -> bool: pass @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerato...
10
0
3
0
3
0
1
0
1
3
0
0
3
2
6
13
29
7
22
13
12
0
19
10
12
2
1
1
7
14,255
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.PostgresDsn
class PostgresDsn(MultiHostDsn): allowed_schemes = {'postgres', 'postgresql', 'postgresql+asyncpg', 'postgresql+pg8000', 'postgresql+psycopg', 'postgresql+psycopg2', 'postgresql+psycopg2cffi', 'postgresql+py-postgresql', 'postgresql+pygresql'} user_required = True __slots__ = ()
class PostgresDsn(MultiHostDsn): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
84
15
1
14
4
13
0
4
4
3
0
4
0
0
14,256
samuelcolvin/pydantic
pydantic/v1/networks.py
pydantic.v1.networks.RedisDsn
class RedisDsn(AnyUrl): __slots__ = () allowed_schemes = {'redis', 'rediss'} host_required = False @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': return {'domain': 'localhost' if not (parts['ipv4'] or parts['ipv6']) else '', 'port': '6379', 'path': '/0'}
class RedisDsn(AnyUrl): @staticmethod def get_default_parts(parts: 'Parts') -> 'Parts': pass
3
0
6
0
6
0
2
0
1
0
0
0
0
0
1
81
12
1
11
6
8
0
6
5
4
2
3
0
2
14,257
samuelcolvin/pydantic
pydantic/v1/parse.py
pydantic.v1.parse.Protocol
import pickle from enum import Enum import json class Protocol(str, Enum): json = 'json' pickle = 'pickle'
class Protocol(str, Enum): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
115
3
0
3
3
2
0
3
3
2
0
4
0
0
14,258
samuelcolvin/pydantic
pydantic/v1/schema.py
pydantic.v1.schema.SkipField
class SkipField(Exception): """ Utility exception used to exclude fields from schema. """ def __init__(self, message: str) -> None: self.message = message
class SkipField(Exception): ''' Utility exception used to exclude fields from schema. ''' def __init__(self, message: str) -> None: pass
2
1
2
0
2
0
1
1
1
1
0
0
1
1
1
11
7
1
3
3
1
3
3
3
1
1
3
0
1
14,259
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ByteSize
from pydantic.v1 import errors class ByteSize(int): @classmethod def __get_validators__(cls) -> 'CallableGenerator': yield cls.validate @classmethod def validate(cls, v: StrIntFloat) -> 'ByteSize': try: return cls(int(v)) except ValueError: pass ...
class ByteSize(int): @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, v: StrIntFloat) -> 'ByteSize': pass def human_readable(self, decimal: bool=False) -> str: pass def to(self, unit: str) -> float: pass
7
0
12
2
10
0
3
0
1
7
0
0
2
0
4
59
52
10
42
16
35
0
39
14
34
5
2
2
12
14,260
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedBytes
from pydantic.v1.utils import import_string, update_not_none from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_v...
class ConstrainedBytes(bytes): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass
5
0
4
0
4
0
2
0
1
2
0
1
0
0
2
59
19
2
17
11
12
0
15
9
12
2
2
0
3
14,261
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedDate
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class ConstrainedDate(date, metaclass=ConstrainedNumberMeta): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass
5
0
3
0
3
0
1
0
2
2
0
0
0
0
2
48
14
2
12
9
7
0
10
7
7
1
3
0
2
14,262
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedDecimal
from pydantic.v1 import errors from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validato...
class ConstrainedDecimal(Decimal, metaclass=ConstrainedNumberMeta): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Decimal) -> Decima...
7
0
17
2
14
2
4
0.12
2
7
0
0
0
0
3
134
66
8
52
20
45
6
40
17
36
9
3
2
11
14,263
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedFloat
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class ConstrainedFloat(float, metaclass=ConstrainedNumberMeta): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass
5
0
12
0
11
1
4
0.03
2
2
0
6
0
0
2
59
35
2
32
12
27
1
23
10
20
5
3
1
7
14,264
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedFrozenSet
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validato...
class ConstrainedFrozenSet(frozenset): @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def frozenset_length_validator(cls, v: 'Optional[FrozenSet[T]]') -> 'Opt...
7
0
6
1
5
0
2
0.17
1
4
0
0
0
0
3
33
32
8
23
11
16
4
20
8
16
4
2
1
6
14,265
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedInt
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class ConstrainedInt(int, metaclass=ConstrainedNumberMeta): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass
5
0
7
0
7
0
2
0
2
2
0
5
0
0
2
71
24
2
22
11
17
0
13
9
10
2
3
0
3
14,266
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedList
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class ConstrainedList(list): @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def list_length_validator(cls, v: 'Optional[List[T]]') -> 'Optional[List[T]]': ...
9
0
7
2
6
0
3
0.12
1
6
0
0
0
0
4
37
46
11
34
15
25
4
30
11
25
4
2
2
11
14,267
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedNumberMeta
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload from pydantic.v1 import errors class ConstrainedNumberMeta(type): def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt': new_cls ...
class ConstrainedNumberMeta(type): def __new__(cls, name: str, bases: Any, dct: Dict[str, Any]) -> 'ConstrainedInt': pass
2
0
9
2
7
2
3
0.25
1
3
0
4
1
0
1
14
10
2
8
3
6
2
8
3
6
3
2
1
3
14,268
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedSet
from pydantic.v1.utils import import_string, update_not_none from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload from pydantic.v1 import errors from pydantic.v1.validators import bytes_validator, constr_length_validator, c...
class ConstrainedSet(set): @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def set_length_validator(cls, v: 'Optional[Set[T]]') -> 'Optional[Set[T]]': ...
7
0
6
1
5
0
2
0.17
1
4
0
0
0
0
3
46
32
8
23
11
16
4
20
8
16
4
2
1
6
14,269
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.ConstrainedStr
import re from pydantic.v1.utils import import_string, update_not_none from pydantic.v1 import errors from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload from pydantic.v1.validators import bytes_validator, constr_length_va...
class ConstrainedStr(str): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Union[str]) -> Union[str]: pass @staticmethod ...
9
0
6
1
6
0
2
0
1
2
0
1
0
0
4
70
42
6
36
17
27
0
27
13
22
4
2
2
9
14,270
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.JsonMeta
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload class JsonMeta(type): def __getitem__(self, t: Type[Any]) -> Type[JsonWrapper]: if t is Any: return Json return _registered(type('JsonWr...
class JsonMeta(type): def __getitem__(self, t: Type[Any]) -> Type[JsonWrapper]: pass
2
0
4
0
4
1
2
0.2
1
3
2
1
1
0
1
14
5
0
5
2
3
1
5
2
3
2
2
1
2
14,271
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.JsonWrapper
class JsonWrapper: pass
class JsonWrapper: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
14,272
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.PaymentCardBrand
from enum import Enum class PaymentCardBrand(str, Enum): amex = 'American Express' mastercard = 'Mastercard' visa = 'Visa' other = 'other' def __str__(self) -> str: return self.value
class PaymentCardBrand(str, Enum): def __str__(self) -> str: pass
2
0
2
0
2
0
1
0.29
2
0
0
0
1
0
1
116
10
1
7
6
5
2
7
6
5
1
4
0
1
14,273
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.PaymentCardNumber
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload from pydantic.v1 import errors from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_v...
class PaymentCardNumber(str): ''' Based on: https://en.wikipedia.org/wiki/Payment_card_number ''' def __init__(self, card_number: str): pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @property def masked(self) -> str: pass @classm...
14
3
10
0
9
1
3
0.15
1
6
1
0
2
1
7
73
91
8
73
28
59
11
61
22
53
5
2
2
19
14,274
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.SecretBytes
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class SecretBytes(SecretField): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Any) -> 'SecretBytes': pass def __init__(...
12
0
4
0
4
0
1
0
1
5
0
0
5
1
8
32
42
8
34
15
22
0
24
12
15
2
5
1
9
14,275
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.SecretField
import abc from typing import TYPE_CHECKING, Any, Callable, ClassVar, Dict, FrozenSet, List, Optional, Pattern, Set, Tuple, Type, TypeVar, Union, cast, overload class SecretField(abc.ABC): """ Note: this should be implemented as a generic like `SecretField(ABC, Generic[T])`, the `__init__()` should b...
class SecretField(abc.ABC): ''' Note: this should be implemented as a generic like `SecretField(ABC, Generic[T])`, the `__init__()` should be part of the abstract class and the `get_secret_value()` method should use the generic `T` type. However Cython doesn't support very well ge...
6
1
2
0
2
0
1
0.9
1
4
0
2
4
0
4
24
23
5
10
6
4
9
9
5
4
2
4
0
5
14,276
samuelcolvin/pydantic
pydantic/v1/types.py
pydantic.v1.types.SecretStr
from pydantic.v1.validators import bytes_validator, constr_length_validator, constr_lower, constr_strip_whitespace, constr_upper, decimal_validator, float_finite_validator, float_validator, frozenset_validator, int_validator, list_validator, number_multiple_validator, number_size_validator, path_exists_validator, path_...
class SecretStr(SecretField): @classmethod def __modify_schema__(cls, field_schema: Dict[str, Any]) -> None: pass @classmethod def __get_validators__(cls) -> 'CallableGenerator': pass @classmethod def validate(cls, value: Any) -> 'SecretStr': pass def __init__(self...
12
0
4
0
4
0
1
0
1
4
0
0
5
1
8
32
42
8
34
15
22
0
24
12
15
2
5
1
9
14,277
samuelcolvin/pydantic
pydantic/v1/utils.py
pydantic.v1.utils.ClassAttribute
from typing import TYPE_CHECKING, AbstractSet, Any, Callable, Collection, Dict, Generator, Iterable, Iterator, List, Mapping, NoReturn, Optional, Set, Tuple, Type, TypeVar, Union class ClassAttribute: """ Hide class attribute from its instances """ __slots__ = ('name', 'value') def __init__(self, ...
class ClassAttribute: ''' Hide class attribute from its instances ''' def __init__(self, name: str, value: Any) -> None: pass def __get__(self, instance: Any, owner: Type[Any]) -> None: pass
3
1
4
0
4
0
2
0.25
0
3
0
0
2
2
2
2
18
3
12
6
9
3
9
6
6
2
0
1
3
14,278
samuelcolvin/pydantic
pydantic/v1/utils.py
pydantic.v1.utils.GetterDict
from pydantic.v1.typing import NoneType, WithArgsTypes, all_literal_values, display_as_type, get_args, get_origin, is_literal_type, is_union from typing import TYPE_CHECKING, AbstractSet, Any, Callable, Collection, Dict, Generator, Iterable, Iterator, List, Mapping, NoReturn, Optional, Set, Tuple, Type, TypeVar, Union ...
class GetterDict(Representation): ''' Hack to make object's smell just enough like dicts for validate_model. We can't inherit from Mapping[str, Any] because it upsets cython so we have to implement all methods ourselves. ''' def __init__(self, obj: Any): pass def __getitem__(self, key...
14
3
3
0
2
1
1
0.32
1
9
0
0
13
1
13
20
60
15
34
20
20
11
34
18
20
3
1
2
17
14,279
samuelcolvin/pydantic
pydantic/v1/utils.py
pydantic.v1.utils.PyObjectStr
class PyObjectStr(str): """ String class where repr doesn't include quotes. Useful with Representation when you want to return a string representation of something that valid (or pseudo-valid) python. """ def __repr__(self) -> str: return str(self)
class PyObjectStr(str): ''' String class where repr doesn't include quotes. Useful with Representation when you want to return a string representation of something that valid (or pseudo-valid) python. ''' def __repr__(self) -> str: pass
2
1
2
0
2
0
1
1.33
1
0
0
0
1
0
1
67
8
1
3
2
1
4
3
2
1
1
2
0
1
14,280
samuelcolvin/pydantic
pydantic/v1/utils.py
pydantic.v1.utils.Representation
from typing import TYPE_CHECKING, AbstractSet, Any, Callable, Collection, Dict, Generator, Iterable, Iterator, List, Mapping, NoReturn, Optional, Set, Tuple, Type, TypeVar, Union class Representation: """ Mixin to provide __str__, __repr__, and __pretty__ methods. See #884 for more details. __pretty__ is ...
class Representation: ''' Mixin to provide __str__, __repr__, and __pretty__ methods. See #884 for more details. __pretty__ is used by [devtools](https://python-devtools.helpmanual.io/) to provide human readable representations of objects. ''' def __repr_args__(self) -> 'ReprArgs': '''...
8
5
6
0
4
2
2
0.6
0
3
0
2
7
0
7
7
58
10
30
12
22
18
29
12
21
3
0
2
12
14,281
samuelcolvin/pydantic
pydantic/v1/utils.py
pydantic.v1.utils.ValueItems
from typing import TYPE_CHECKING, AbstractSet, Any, Callable, Collection, Dict, Generator, Iterable, Iterator, List, Mapping, NoReturn, Optional, Set, Tuple, Type, TypeVar, Union class ValueItems(Representation): """ Class for more convenient calculation of excluded or included fields on values. """ __...
class ValueItems(Representation): ''' Class for more convenient calculation of excluded or included fields on values. ''' def __init__(self, value: Any, items: Union['AbstractSetIntStr', 'MappingIntStrAny']) -> None: pass def is_excluded(self, item: Any) -> bool: ''' Check...
15
6
12
1
8
3
3
0.42
1
8
0
0
6
1
10
17
144
25
84
27
69
35
71
23
60
11
1
2
32
14,282
samuelcolvin/pydantic
pydantic/v1/validators.py
pydantic.v1.validators.IfConfig
from typing import TYPE_CHECKING, Any, Callable, Deque, Dict, ForwardRef, FrozenSet, Generator, Hashable, List, NamedTuple, Pattern, Set, Tuple, Type, TypeVar, Union from pydantic.v1.typing import AnyCallable, all_literal_values, display_as_type, get_class, is_callable_type, is_literal_type, is_namedtuple, is_none_type...
class IfConfig: def __init__(self, validator: AnyCallable, *config_attr_names: str, ignored_value: Any=False) -> None: pass def check(self, config: Type['BaseConfig']) -> bool: pass
3
0
3
0
3
0
1
0
0
3
0
0
2
3
2
2
8
1
7
6
4
0
7
6
4
1
0
0
2
14,283
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.GenericBeforeBaseModelWarning
class GenericBeforeBaseModelWarning(Warning): pass
class GenericBeforeBaseModelWarning(Warning): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
11
2
0
2
1
1
0
2
1
1
0
4
0
0
14,284
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecatedSince20
class PydanticDeprecatedSince20(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.0.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 0), expected_removal=(3, 0))
class PydanticDeprecatedSince20(PydanticDeprecationWarning): '''A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.0.''' def __init__(self, message: str, *args: object) -> None: pass
2
1
2
0
2
0
1
0.33
1
2
0
0
1
0
1
15
5
1
3
2
1
1
3
2
1
1
6
0
1
14,285
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecatedSince210
class PydanticDeprecatedSince210(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.10.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 10), expected_removal=(3, 0))
class PydanticDeprecatedSince210(PydanticDeprecationWarning): '''A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.10.''' def __init__(self, message: str, *args: object) -> None: pass
2
1
2
0
2
0
1
0.33
1
2
0
0
1
0
1
15
5
1
3
2
1
1
3
2
1
1
6
0
1
14,286
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecatedSince211
class PydanticDeprecatedSince211(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.11.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 11), expected_removal=(3, 0))
class PydanticDeprecatedSince211(PydanticDeprecationWarning): '''A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.11.''' def __init__(self, message: str, *args: object) -> None: pass
2
1
2
0
2
0
1
0.33
1
2
0
0
1
0
1
15
5
1
3
2
1
1
3
2
1
1
6
0
1
14,287
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecatedSince26
class PydanticDeprecatedSince26(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 6), expected_removal=(3, 0))
class PydanticDeprecatedSince26(PydanticDeprecationWarning): '''A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.''' def __init__(self, message: str, *args: object) -> None: pass
2
1
2
0
2
0
1
0.33
1
2
0
0
1
0
1
15
5
1
3
2
1
1
3
2
1
1
6
0
1
14,288
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecatedSince29
class PydanticDeprecatedSince29(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.9.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 9), expected_removal=(3, 0))
class PydanticDeprecatedSince29(PydanticDeprecationWarning): '''A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.9.''' def __init__(self, message: str, *args: object) -> None: pass
2
1
2
0
2
0
1
0.33
1
2
0
0
1
0
1
15
5
1
3
2
1
1
3
2
1
1
6
0
1
14,289
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticDeprecationWarning
from .version import version_short class PydanticDeprecationWarning(DeprecationWarning): """A Pydantic specific deprecation warning. This warning is raised when using deprecated functionality in Pydantic. It provides information on when the deprecation was introduced and the expected version in which the ...
class PydanticDeprecationWarning(DeprecationWarning): '''A Pydantic specific deprecation warning. This warning is raised when using deprecated functionality in Pydantic. It provides information on when the deprecation was introduced and the expected version in which the corresponding functionality will be ...
3
1
8
0
8
0
2
0.42
1
4
0
5
2
0
2
14
32
5
19
6
14
8
14
4
11
2
5
1
4
14,290
samuelcolvin/pydantic
pydantic/warnings.py
pydantic.warnings.PydanticExperimentalWarning
class PydanticExperimentalWarning(Warning): """A Pydantic specific experimental functionality warning. This warning is raised when using experimental functionality in Pydantic. It is raised to warn users that the functionality may change or be removed in future versions of Pydantic. """
class PydanticExperimentalWarning(Warning): '''A Pydantic specific experimental functionality warning. This warning is raised when using experimental functionality in Pydantic. It is raised to warn users that the functionality may change or be removed in future versions of Pydantic. ''' pass
1
1
0
0
0
0
0
4
1
0
0
0
0
0
0
11
6
1
1
1
0
4
1
1
0
0
4
0
0
14,291
samuelcolvin/pydantic
tests/mypy/modules/pydantic_settings.py
pydantic_settings.Settings
from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): foo: str
class Settings(BaseSettings): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
14,292
samuelcolvin/pydantic
tests/mypy/modules/pydantic_settings.py
pydantic_settings.SettingsWithConfigDict
from pydantic_settings import BaseSettings, SettingsConfigDict class SettingsWithConfigDict(BaseSettings): bar: str model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8')
class SettingsWithConfigDict(BaseSettings): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
4
1
3
2
2
0
3
2
2
0
1
0
0
14,293
samuelcolvin/pydantic
tests/typechecking/root_model.py
root_model.StrRootModel
from pydantic import RootModel class StrRootModel(RootModel[str]): pass
class StrRootModel(RootModel[str]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
2
0
2
1
1
0
2
1
1
0
6
0
0
14,294
samuelcolvin/pydantic
tests/mypy/modules/root_models.py
root_models.Maybe
from pydantic import BaseModel, RootModel class Maybe(RootModel[T | None]): pass
class Maybe(RootModel[T | None]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
2
0
2
1
1
0
2
1
1
0
6
0
0
14,295
samuelcolvin/pydantic
tests/mypy/modules/root_models.py
root_models.Model
from pydantic import BaseModel, RootModel from typing import Generic, TypeVar class Model(BaseModel, Generic[V]): m1: Maybe[int] m2: Maybe[V] m3: Maybe
class Model(BaseModel, Generic[V]): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
85
4
0
4
1
3
0
4
1
3
0
5
0
0
14,296
samuelcolvin/pydantic
tests/mypy/modules/root_models.py
root_models.Pets1
from pydantic import BaseModel, RootModel class Pets1(RootModel[list[str]]): pass
class Pets1(RootModel[list[str]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
2
0
2
1
1
0
2
1
1
0
6
0
0
14,297
samuelcolvin/pydantic
tests/mypy/modules/root_models.py
root_models.Pets3
from pydantic import BaseModel, RootModel class Pets3(RootModel): root: list[str]
class Pets3(RootModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
2
0
2
1
1
0
2
1
1
0
6
0
0
14,298
samuelcolvin/pydantic
tests/mypy/modules/root_models.py
root_models.Pets4
from pydantic import BaseModel, RootModel class Pets4(RootModel[list[str]]): pets: list[str]
class Pets4(RootModel[list[str]]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
93
2
0
2
1
1
0
2
1
1
0
6
0
0
14,299
samuelcolvin/pydantic
tests/mypy/modules/strict_equality.py
strict_equality.User
from pydantic import BaseModel class User(BaseModel): username: str
class User(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
83
2
0
2
1
1
0
2
1
1
0
5
0
0