Data validation using Python type hints
This report presents the forensic synthetic code analysis of pydantic/pydantic, a Python project with 28,271 GitHub stars. SynthScan v2.0 examined 239,195 lines of code across 705 source files, recording 3481 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 14.2 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 3481 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_assert_in_validators.py | 23 | def test_assert_raises_validation_error(): | CODE |
| LOW | tests/test_dunder_all.py | 13 | def test_explicit_reexports_exist() -> None: | CODE |
| LOW⚡ | tests/test_version.py | 31 | def test_version_attribute_is_present(): | CODE |
| LOW⚡ | tests/test_version.py | 35 | def test_version_attribute_is_a_string(): | CODE |
| LOW⚡ | tests/test_version.py | 39 | def test_check_pydantic_core_version() -> None: | CODE |
| LOW | tests/test_computed_fields.py | 69 | def test_computed_fields_json_schema(): | CODE |
| LOW | tests/test_computed_fields.py | 217 | def test_properties_and_computed_fields(): | CODE |
| LOW | tests/test_computed_fields.py | 244 | def test_computed_fields_repr(): | CODE |
| LOW | tests/test_computed_fields.py | 426 | def test_private_computed_field(): | CODE |
| LOW | tests/test_computed_fields.py | 546 | def test_abstractmethod_missing(bases: tuple[Any, ...]): | CODE |
| LOW⚡ | tests/test_computed_fields.py | 567 | def __get_pydantic_core_schema__(cls, source: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema: | CODE |
| LOW⚡ | tests/test_computed_fields.py | 573 | def test_computed_fields_infer_return_type(): | CODE |
| LOW⚡ | tests/test_computed_fields.py | 583 | def test_computed_fields_missing_return_type(): | CODE |
| LOW | tests/test_computed_fields.py | 611 | def my_aliased_computed_field_none(self) -> int: | CODE |
| LOW | tests/test_computed_fields.py | 660 | def test_alias_generator_defer_build() -> None: | CODE |
| LOW | tests/test_computed_fields.py | 740 | def test_multiple_references_to_schema(model_factory: Callable[[], Any]) -> None: | CODE |
| LOW | tests/test_computed_fields.py | 765 | def test_generic_computed_field(): | CODE |
| LOW | tests/test_computed_fields.py | 796 | def test_computed_field_override_raises(): | CODE |
| LOW | tests/test_computed_fields.py | 812 | def test_computed_field_excluded_from_model_dump_recursive() -> None: | CODE |
| LOW | tests/test_computed_fields.py | 828 | def test_computed_field_with_field_serializer(): | CODE |
| LOW | tests/test_computed_fields.py | 844 | def test_computed_fields_exclude() -> None: | CODE |
| LOW | tests/test_computed_fields.py | 859 | def test_computed_fields_serialization_exclude_if() -> None: | CODE |
| LOW | tests/test_computed_fields.py | 881 | def test_computed_fields_serialization_exclude_if_from_annotated() -> None: | CODE |
| LOW | tests/test_v1.py | 34 | def test_isinstance_does_not_raise_deprecation_warnings(): | CODE |
| LOW | tests/test_utils.py | 39 | def test_import_module_invalid(): | CODE |
| LOW | tests/test_utils.py | 94 | def test_lenient_issubclass_with_generic_aliases(): | CODE |
| LOW | tests/test_utils.py | 101 | def test_lenient_issubclass_is_lenient(): | CODE |
| LOW | tests/test_utils.py | 318 | def test_deep_update_is_not_mutating(): | CODE |
| LOW⚡ | tests/test_utils.py | 364 | def test_smart_deepcopy_immutable_non_sequence(obj, mocker): | CODE |
| LOW⚡ | tests/test_utils.py | 372 | def test_smart_deepcopy_empty_collection(empty_collection, mocker): | CODE |
| LOW⚡ | tests/test_utils.py | 382 | def test_smart_deepcopy_collection(collection, mocker): | CODE |
| LOW⚡ | tests/test_utils.py | 389 | def test_smart_deepcopy_error(error, mocker): | CODE |
| LOW⚡ | tests/test_utils.py | 439 | def test_on_lower_camel_zero_length(): | CODE |
| LOW⚡ | tests/test_utils.py | 443 | def test_on_lower_camel_one_length(): | CODE |
| LOW⚡ | tests/test_utils.py | 447 | def test_on_lower_camel_many_length(): | CODE |
| LOW | tests/conftest.py | 32 | def _extract_source_code_from_function(function: FunctionType): | CODE |
| LOW | tests/conftest.py | 155 | def generate_schema_call_counter(*args: Any, **kwargs: Any) -> Any: | CODE |
| LOW⚡ | tests/test_warnings.py | 5 | def test_pydantic_deprecation_warning(): | CODE |
| LOW⚡ | tests/test_warnings.py | 13 | def test_pydantic_deprecation_warning_tailing_dot_in_message(): | CODE |
| LOW⚡ | tests/test_warnings.py | 20 | def test_pydantic_deprecation_warning_calculated_expected_removal(): | CODE |
| LOW | tests/test_decorators.py | 11 | def _two_pos_required_args_extra_optional(a, b, c=1, d=2, *, e=3): | CODE |
| LOW | tests/test_decorators.py | 19 | def _one_pos_required_arg_one_optional(a, b=1): | CODE |
| LOW | tests/test_decorators.py | 47 | def test_inspect_validator_error_wrap(): | CODE |
| LOW | tests/test_decorators.py | 62 | def test_inspect_validator_error(mode): | CODE |
| LOW | tests/test_decorators.py | 76 | def test_inspect_field_serializer_no_signature() -> None: | CODE |
| LOW⚡ | tests/test_decorators.py | 100 | def test_inspect_annotated_serializer(obj, mode, expected): | CODE |
| LOW⚡ | tests/test_decorators.py | 105 | def test_inspect_annotated_serializer_invalid_number_of_arguments(mode): | CODE |
| LOW⚡ | tests/test_decorators.py | 114 | def test_plain_class_not_mutated() -> None: | CODE |
| LOW | tests/test_decorators.py | 128 | def test_decorator_info_not_mutated() -> None: | CODE |
| LOW | tests/test_types_typeddict.py | 89 | def test_typeddict_annotated_simple(TypedDict, req_no_req): | CODE |
| LOW | tests/test_types_typeddict.py | 109 | def test_typeddict_total_false(TypedDict, req_no_req): | CODE |
| LOW | tests/test_types_typeddict.py | 176 | def test_partial_new_typeddict(TypedDict): | CODE |
| LOW | tests/test_types_typeddict.py | 190 | def test_typeddict_extra_default(TypedDict): | CODE |
| LOW | tests/test_types_typeddict.py | 230 | def __get_pydantic_core_schema__( | CODE |
| LOW | tests/test_types_typeddict.py | 311 | def test_typeddict_postponed_annotation(TypedDict): | CODE |
| LOW | tests/test_types_typeddict.py | 351 | def test_typeddict_from_attributes(): | CODE |
| LOW | tests/test_types_typeddict.py | 383 | def test_typeddict_not_required_schema(TypedDict, req_no_req): | CODE |
| LOW | tests/test_types_typeddict.py | 414 | def test_typed_dict_inheritance_schema(TypedDict, req_no_req): | CODE |
| LOW | tests/test_types_typeddict.py | 449 | def test_typeddict_annotated_nonoptional_schema(TypedDict): | CODE |
| LOW | tests/test_types_typeddict.py | 529 | def test_generic_typeddict_in_concrete_model(): | CODE |
| 2693 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 1 | CODE | |
| LOW | tests/test_types_typeddict.py | 15 | CODE | |
| LOW | tests/test_plugins.py | 1 | CODE | |
| LOW | tests/test_model_validator.py | 1 | CODE | |
| LOW | tests/test_typing.py | 7 | CODE | |
| LOW | tests/test_docs.py | 1 | CODE | |
| LOW | tests/test_docs.py | 41 | CODE | |
| LOW | tests/test_docs.py | 46 | CODE | |
| LOW | tests/test_docs.py | 51 | CODE | |
| LOW | tests/test_deprecated_validate_arguments.py | 3 | CODE | |
| LOW | tests/test_types_namedtuple.py | 7 | CODE | |
| LOW | tests/test_pipeline.py | 3 | CODE | |
| LOW | tests/test_titles.py | 14 | CODE | |
| LOW | tests/test_titles.py | 14 | CODE | |
| LOW | tests/mypy/test_mypy.py | 1 | CODE | |
| LOW | tests/mypy/test_mypy.py | 7 | CODE | |
| LOW | tests/mypy/test_mypy.py | 12 | CODE | |
| LOW | tests/mypy/test_mypy.py | 12 | CODE | |
| LOW | tests/mypy/modules/create_model_var.py | 1 | CODE | |
| LOW | tests/mypy/outputs/mypy-plugin_ini/create_model_var.py | 1 | CODE | |
| LOW | tests/benchmarks/test_discriminated_unions.py | 1 | CODE | |
| LOW | tests/benchmarks/test_fastapi_startup_generics.py | 3 | CODE | |
| LOW | tests/benchmarks/test_fastapi_startup_simple.py | 3 | CODE | |
| LOW | tests/benchmarks/basemodel_eq_performance.py | 1 | CODE | |
| LOW | tests/benchmarks/basemodel_eq_performance.py | 559 | CODE | |
| LOW | tests/benchmarks/basemodel_eq_performance.py | 560 | CODE | |
| LOW | docs/plugins/conversion_table.py | 1 | CODE | |
| LOW | docs/plugins/algolia.py | 4 | CODE | |
| LOW | docs/plugins/main.py | 1 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 1 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 8 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 31 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 31 | CODE | |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 31 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 6 | CODE | |
| LOW | pydantic-core/tests/conftest.py | 1 | CODE | |
| LOW | pydantic-core/tests/test_typing.py | 1 | CODE | |
| LOW | pydantic-core/tests/test_strict.py | 1 | CODE | |
| LOW | pydantic-core/tests/serializers/test_union.py | 1 | CODE | |
| LOW | pydantic-core/tests/benchmarks/nested_schema.py | 1 | CODE | |
| LOW | pydantic-core/tests/benchmarks/complete_schema.py | 1 | CODE | |
| 189 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | .github/actions/people/people.py | 364 | Make a GraphQL request to GitHub API. Args: settings: Configuration settings including API token qu | STRING |
| HIGH | pydantic/color.py | 114 | Returns the name of the color if it can be found in `COLORS_BY_VALUE` dictionary, otherwise returns the hexadeci | STRING |
| HIGH | pydantic/color.py | 260 | Parse a tuple or list to get RGBA values. Args: value: A tuple or list. Returns: An `RGBA` tup | STRING |
| HIGH | pydantic/color.py | 282 | Parse a string representing a color to an RGBA tuple. Possible formats for the input string include: * named c | STRING |
| HIGH | pydantic/color.py | 356 | Parse the color value provided and return a number between 0 and 1. Args: value: An integer or string color | STRING |
| HIGH | pydantic/color.py | 383 | Parse an alpha value checking it's a valid float in the range 0 to 1. Args: value: The input value to parse | STRING |
| HIGH | pydantic/color.py | 441 | Converts a float value between 0 and 1 (inclusive) to an integer between 0 and 255 (inclusive). Args: c: Th | STRING |
| HIGH | pydantic/fields.py | 293 | Create a new `FieldInfo` object with the `Field` function. Args: default: The default value for the | STRING |
| HIGH | pydantic/fields.py | 649 | Return a new `FieldInfo` instance from a `dataclasses.Field` instance. Args: dc_field: The `datacla | STRING |
| HIGH | pydantic/fields.py | 1215 | !!! abstract "Usage Documentation" [Fields](../concepts/fields.md) Create a field for objects that can be c | STRING |
| HIGH | pydantic/fields.py | 1541 | !!! abstract "Usage Documentation" [Private Model Attributes](../concepts/models.md#private-model-attributes) | STRING |
| HIGH | pydantic/fields.py | 1729 | !!! abstract "Usage Documentation" [The `computed_field` decorator](../concepts/fields.md#the-computed_field-dec | STRING |
| HIGH | pydantic/json_schema.py | 224 | !!! abstract "Usage Documentation" [Customizing the JSON Schema Generation Process](../concepts/json_schema.md#c | STRING |
| HIGH | pydantic/json_schema.py | 353 | Generates JSON schema definitions from a list of core schemas, pairing the generated definitions with a mapping | STRING |
| HIGH | pydantic/json_schema.py | 400 | Generates a JSON schema for a specified schema in a specified mode. Args: schema: A Pydantic model. | STRING |
| HIGH | pydantic/json_schema.py | 485 | Generate a JSON schema based on the input schema. Args: schema_or_field: The core schema to | STRING |
| HIGH | pydantic/json_schema.py | 1736 | Resolve a JsonSchemaValue to the non-ref schema if it is a $ref schema. Args: json_schema: The sche | STRING |
| HIGH | pydantic/root_model.py | 74 | Create a new model using the provided root object and update fields set. Args: root: The root objec | STRING |
| HIGH | pydantic/type_adapter.py | 264 | Initialize the core schema, validator, and serializer for the type. Args: ns_resolver: The namespac | STRING |
| HIGH | pydantic/type_adapter.py | 409 | Validate a Python object against the model. If validation fails, the resulting [`ValidationError`][pydantic_cor | STRING |
| HIGH | pydantic/dataclasses.py | 80 | !!! abstract "Usage Documentation" [`dataclasses`](../concepts/dataclasses.md) A decorator used to create a | STRING |
| HIGH | pydantic/main.py | 630 | Compute the class name for parametrizations of generic classes. This method can be overridden to achieve a cust | STRING |
| HIGH | pydantic/main.py | 733 | Validate a pydantic model instance. If validation fails, the resulting [`ValidationError`][pydantic_core.Valida | STRING |
| HIGH | pydantic/main.py | 786 | !!! abstract "Usage Documentation" [JSON Parsing](../concepts/json.md#json-parsing) Validate the gi | STRING |
| HIGH | pydantic/main.py | 1792 | !!! abstract "Usage Documentation" [Dynamic Model Creation](../concepts/models.md#dynamic-model-creation) D | STRING |
| HIGH | pydantic/annotated_handlers.py | 51 | Get the real schema for a `{"$ref": ...}` schema. If the schema given is not a `$ref` schema, it will be returne | STRING |
| HIGH | pydantic/annotated_handlers.py | 101 | Get the real schema for a `definition-ref` schema. If the schema given is not a `definition-ref` schema, it will | STRING |
| HIGH | pydantic/_internal/_schema_generation_shared.py | 41 | Resolves `$ref` in the json schema. This returns the input json schema if there is no `$ref` in json schema. | STRING |
| HIGH | pydantic/_internal/_schema_generation_shared.py | 104 | Resolves reference in the core schema. Args: maybe_ref_schema: The input core schema that may conta | STRING |
| HIGH | pydantic/_internal/_decorators_v1.py | 55 | Wrap a V1 style field validator for V2 compatibility. Args: validator: The V1 style field validator. R | STRING |
| HIGH | pydantic/_internal/_known_annotated_metadata.py | 172 | Apply `annotation` to `schema` if it is an annotation we know about (Gt, Le, etc.). Otherwise return `None`. Th | STRING |
| HIGH | pydantic/_internal/_model_construction.py | 413 | Iterate over the namespace and: * gather private attributes * check for items which look like fields but are not | STRING |
| HIGH | pydantic/_internal/_model_construction.py | 616 | Finish building a model class. This logic must be called after class has been created since validation functions mu | STRING |
| HIGH | pydantic/_internal/_generate_schema.py | 703 | Generate core schema. Args: obj: The object to generate core schema for. Returns: | STRING |
| HIGH | pydantic/_internal/_discriminated_union.py | 39 | Applies the discriminator and returns a new core schema. Args: schema: The input schema. discrimina | STRING |
| HIGH | pydantic/_internal/_discriminated_union.py | 141 | Return a new CoreSchema based on `schema` that uses a tagged-union with the discriminator provided to this class | STRING |
| HIGH | pydantic/_internal/_decorators.py | 351 | Get the attribute from the next class in the MRO that has it, aiming to simulate calling the method on the actual cl | STRING |
| HIGH | pydantic/_internal/_decorators.py | 386 | Get an attribute out of the `__dict__` following the MRO. This prevents the call to `__get__` on the descriptor, and | STRING |
| HIGH | pydantic/_internal/_fields.py | 230 | Collect the fields and class variables names of a nascent Pydantic model. The fields collection process is *lenient | STRING |
| HIGH | pydantic/_internal/_generics.py | 166 | Used inside a function to check whether it was called globally. Args: depth: The depth to get the frame. | STRING |
| HIGH | pydantic/_internal/_dataclasses.py | 93 | Finish building a pydantic dataclass. This logic is called on a class which has already been wrapped in `dataclasse | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/test_serialize.py | 246 | assert MyModel(x=None).model_dump_json() == '{"x":null}' | CODE |
| HIGH | tests/test_edge_cases.py | 2227 | '{"v": null}', | CODE |
| HIGH | tests/test_json.py | 328 | == '{"name":"Pumbaa","SSN":234,"birthday":737424000.0,"phone":18007267864,"friend":null}' | CODE |
| HIGH | tests/test_types.py | 4400 | Foobar.model_validate_json('{"password": 1234, "empty_password": null}') | CODE |
| HIGH | pydantic-core/tests/test_json.py | 185 | assert v.validate_json('{"1": 1, "2": "a", "3": null}') == {'1': 1, '2': 'a', '3': None} | CODE |
| HIGH | pydantic-core/tests/serializers/test_model.py | 315 | assert s.to_json(BasicModel(foo=None, bar=b'more')) == b'{"foo":null,"bar":"more"}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_model.py | 827 | s.to_json(Model(3, 4), exclude_none=False, by_alias=True) == b'{"width":3,"height":4,"Area":12,"volume":null}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_model.py | 883 | s.to_json(Model(3, 4), exclude_none=False, by_alias=True) == b'{"width":3,"height":4,"volume":null,"Area":12}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_model.py | 1090 | assert s.to_json(m) == b'{"field_a":"test","field_b":12,"field_c":null,"field_d":[1,2,3]}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_model.py | 1104 | assert s.to_json(m, exclude={'field_d': [0]}) == b'{"field_a":"test","field_b":12,"field_c":null,"field_d":[2,3]}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_typed_dict.py | 156 | assert v.to_json({'foo': 1, 'bar': b'more', 'c': None}) == b'{"foo":1,"bar":"more","c":null}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_typed_dict.py | 157 | assert v.to_json({'foo': None, 'bar': b'more'}) == b'{"foo":null,"bar":"more"}' | CODE |
| HIGH | pydantic-core/tests/serializers/test_any.py | 656 | assert s.to_json([inf]) == b'[null]' | CODE |
| HIGH | pydantic-core/tests/serializers/test_any.py | 659 | assert s.to_json([nan]) == b'[null]' | CODE |
| HIGH | pydantic-core/tests/serializers/test_json.py | 23 | assert s.to_json(v) == b'["a",[1,2],null]' | CODE |
| HIGH | pydantic/json_schema.py | 1505 | with self._config_wrapper_stack.push(config): | CODE |
| HIGH | pydantic/json_schema.py | 1647 | with self._config_wrapper_stack.push(config): | CODE |
| HIGH | pydantic/json_schema.py | 1858 | with self._config_wrapper_stack.push(config): | CODE |
| HIGH | pydantic/_internal/_typing_extra.py | 328 | with ns_resolver.push(base): | CODE |
| HIGH | pydantic/_internal/_typing_extra.py | 382 | with ns_resolver.push(base): | CODE |
| HIGH | pydantic/_internal/_namespace_utils.py | 202 | with ns_resolver.push(Model): | STRING |
| HIGH | pydantic/_internal/_namespace_utils.py | 209 | with ns_resolver.push(Sub): | STRING |
| HIGH | pydantic/_internal/_generate_schema.py | 758 | with self._config_wrapper_stack.push(config_wrapper), self._ns_resolver.push(cls): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1019 | with self.model_type_stack.push(obj): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1275 | with self.field_name_stack.push(name): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1352 | with self._ns_resolver.push(origin): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1389 | self.model_type_stack.push(typed_dict_cls), | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1415 | with self._config_wrapper_stack.push(config): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1518 | self.model_type_stack.push(namedtuple_cls), | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1584 | with self.field_name_stack.push(name): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1634 | with self.field_name_stack.push(name): | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1822 | self.model_type_stack.push(dataclass), | CODE |
| HIGH | pydantic/_internal/_generate_schema.py | 1852 | with self._ns_resolver.push(dataclass), self._config_wrapper_stack.push(config): | CODE |
| HIGH | pydantic/_internal/_fields.py | 461 | with ns_resolver.push(cls): | CODE |
| HIGH | pydantic/_internal/_fields.py | 569 | with ns_resolver.push(base): | CODE |
| HIGH | pydantic/_internal/_fields.py | 666 | with ns_resolver.push(cls): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 50 | name: str = 'John Doe' | CODE |
| LOW | README.md | 57 | #> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] | COMMENT |
| LOW | tests/test_types_typeddict.py | 978 | m = Model.model_validate({'a': {'name': 'John Doe', 'extra': 'something'}}) | CODE |
| LOW | tests/test_types_typeddict.py | 980 | assert m.model_dump() == {'a': {'name': 'John Doe', 'extra': 'something'}} | CODE |
| LOW | tests/test_rich_repr.py | 13 | name: str = 'John Doe' | CODE |
| LOW | tests/test_rich_repr.py | 26 | ('name', 'John Doe'), | CODE |
| LOW⚡ | tests/test_dataclasses.py | 561 | name: str = 'John Doe' | CODE |
| LOW⚡ | tests/test_dataclasses.py | 570 | assert fields['name'].default == 'John Doe' | CODE |
| LOW | tests/test_dataclasses.py | 614 | name: str = 'John Doe' | CODE |
| LOW | tests/test_dataclasses.py | 642 | 'name': {'default': 'John Doe', 'title': 'Name', 'type': 'string'}, | CODE |
| LOW⚡ | tests/test_config.py | 124 | ('id: int = 1', 'bar=2', 'baz: Any', "name: str = 'John Doe'", 'foo: str', '**data'), | CODE |
| LOW⚡ | tests/test_config.py | 126 | assert _equals(str(sig), "(id: int = 1, bar=2, *, baz: Any, name: str = 'John Doe', foo: str, **data) -> None") | CODE |
| LOW | tests/test_config.py | 111 | name: str = 'John Doe' | CODE |
| LOW | tests/test_networks.py | 235 | url = validate_url('http://user:@example.org') | CODE |
| LOW | tests/test_networks.py | 242 | url = validate_url('http://:password@example.org') | CODE |
| LOW⚡ | tests/test_edge_cases.py | 2327 | assert module.User(id=12).model_dump() == {'id': 12, 'name': 'Jane Doe'} | CODE |
| LOW | tests/test_edge_cases.py | 2800 | data = {'age': 'John Doe'} | CODE |
| LOW⚡ | tests/test_edge_cases.py | 2320 | name: str = 'Jane Doe' | STRING |
| LOW | tests/test_json_schema.py | 6395 | b: Annotated[int, 'placeholder'] = ... | CODE |
| LOW | tests/test_model_signature.py | 53 | name: str = 'John Doe' | CODE |
| LOW⚡ | tests/test_model_signature.py | 66 | ('id: int = 1', 'bar=2', 'baz: Any', "name: str = 'John Doe'", 'foo: str', '**data'), | CODE |
| LOW⚡ | tests/test_model_signature.py | 69 | assert _equals(str(sig), "(id: int = 1, bar=2, *, baz: Any, name: str = 'John Doe', foo: str, **data) -> None") | CODE |
| LOW | tests/test_types.py | 7050 | assert Foo(baz=' uSeR@ExAmPlE.com ').baz == 'user@example.com' | CODE |
| LOW | docs/index.md | 63 | name: str = 'John Doe' # (2)! | CODE |
| LOW | docs/index.md | 86 | 'name': 'John Doe', | STRING |
| LOW | docs/index.md | 120 | name: str = 'John Doe' | CODE |
| LOW | docs/plugins/devtools_output.html | 22 | user: id=123 name='John Doe' signup_ts=datetime.datetime(2019, 6, 1, 12, 22) friends=[1234, 4567, 7890] address=Address( | CODE |
| LOW | docs/integrations/devtools.md | 38 | name='John Doe', | CODE |
| LOW⚡ | docs/examples/queues.md | 38 | user1 = User(id=1, name='John Doe', email='john@example.com') | CODE |
| LOW⚡ | docs/examples/queues.md | 39 | user2 = User(id=2, name='Jane Doe', email='jane@example.com') | CODE |
| LOW⚡ | docs/examples/queues.md | 42 | #> Added to queue: {"id":1,"name":"John Doe","email":"john@example.com"} | COMMENT |
| LOW⚡ | docs/examples/queues.md | 45 | #> Added to queue: {"id":2,"name":"Jane Doe","email":"jane@example.com"} | COMMENT |
| LOW | docs/examples/queues.md | 59 | #> Validated user: User(id=1, name='John Doe', email='john@example.com') | COMMENT |
| LOW | docs/examples/queues.md | 62 | #> Validated user: User(id=2, name='Jane Doe', email='jane@example.com') | COMMENT |
| LOW⚡ | docs/examples/queues.md | 109 | user1 = User(id=1, name='John Doe', email='john@example.com') | CODE |
| LOW⚡ | docs/examples/queues.md | 110 | user2 = User(id=2, name='Jane Doe', email='jane@example.com') | CODE |
| LOW⚡ | docs/examples/queues.md | 113 | #> Added to queue: {"id":1,"name":"John Doe","email":"john@example.com"} | COMMENT |
| LOW⚡ | docs/examples/queues.md | 116 | #> Added to queue: {"id":2,"name":"Jane Doe","email":"jane@example.com"} | COMMENT |
| LOW | docs/examples/queues.md | 205 | user1 = User(id=1, name='John Doe', email='john@example.com') | CODE |
| LOW | docs/examples/queues.md | 206 | user2 = User(id=2, name='Jane Doe', email='jane@example.com') | CODE |
| LOW | docs/examples/files.md | 16 | "name": "John Doe", | CODE |
| LOW | docs/examples/files.md | 39 | #> name='John Doe' age=30 email='john@example.com' | COMMENT |
| LOW | docs/examples/files.md | 97 | "name": "John Doe", | CODE |
| LOW | docs/examples/files.md | 102 | "name": "Jane Doe", | CODE |
| LOW | docs/examples/files.md | 128 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW | docs/examples/files.md | 128 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW | docs/examples/files.md | 142 | {"name": "John Doe", "age": 30, "email": "john@example.com"} | CODE |
| LOW | docs/examples/files.md | 143 | {"name": "Jane Doe", "age": 25, "email": "jane@example.com"} | CODE |
| LOW | docs/examples/files.md | 163 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW | docs/examples/files.md | 163 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW⚡ | docs/examples/files.md | 199 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW⚡ | docs/examples/files.md | 199 | #> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com') | COMMENT |
| LOW⚡ | docs/examples/files.md | 209 | name = "John Doe" | CODE |
| LOW | docs/examples/files.md | 233 | #> name='John Doe' age=30 email='john@example.com' | COMMENT |
| LOW | docs/examples/files.md | 267 | #> name='John Doe' age=30 email='john@example.com' | COMMENT |
| LOW | docs/examples/files.md | 303 | #> name='John Doe' age=30 email='john@example.com' | COMMENT |
| LOW | docs/examples/files.md | 337 | #> name='John Doe' age=30 email='john@example.com' | COMMENT |
| LOW | docs/concepts/json_schema.md | 939 | 'name': 'John Doe', | CODE |
| LOW | docs/concepts/json_schema.md | 953 | "name": "John Doe" | STRING |
| LOW⚡ | docs/concepts/unions.md | 152 | user_01 = User(id=123, name='John Doe') | CODE |
| 41 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_exports.py | 33 | CODE | |
| LOW | tests/test_exports.py | 39 | CODE | |
| LOW | docs/plugins/main.py | 54 | CODE | |
| LOW | pydantic-core/wasm-preview/run_tests.py | 18 | CODE | |
| LOW | pydantic-core/tests/test_errors.py | 704 | CODE | |
| LOW | pydantic-core/tests/validators/test_string.py | 351 | CODE | |
| LOW | pydantic-core/tests/validators/test_url.py | 70 | CODE | |
| LOW | pydantic-core/tests/validators/test_url.py | 484 | CODE | |
| LOW | pydantic-core/tests/validators/test_url.py | 982 | CODE | |
| LOW | pydantic-core/tests/validators/test_url.py | 1038 | CODE | |
| LOW | .github/actions/people/people.py | 451 | CODE | |
| LOW | .github/actions/people/people.py | 497 | CODE | |
| LOW | .github/actions/people/people.py | 581 | CODE | |
| LOW | pydantic/fields.py | 481 | CODE | |
| LOW | pydantic/fields.py | 582 | CODE | |
| LOW | pydantic/fields.py | 841 | CODE | |
| LOW | pydantic/mypy.py | 188 | CODE | |
| LOW | pydantic/mypy.py | 371 | CODE | |
| LOW | pydantic/mypy.py | 586 | CODE | |
| LOW | pydantic/mypy.py | 919 | CODE | |
| LOW | pydantic/mypy.py | 1022 | CODE | |
| LOW | pydantic/mypy.py | 1047 | CODE | |
| LOW | pydantic/mypy.py | 1105 | CODE | |
| LOW | pydantic/types.py | 3074 | CODE | |
| LOW | pydantic/types.py | 1028 | CODE | |
| LOW | pydantic/json_schema.py | 2824 | CODE | |
| LOW | pydantic/json_schema.py | 200 | CODE | |
| LOW | pydantic/json_schema.py | 867 | CODE | |
| LOW | pydantic/json_schema.py | 910 | CODE | |
| LOW | pydantic/json_schema.py | 1392 | CODE | |
| LOW | pydantic/json_schema.py | 1486 | CODE | |
| LOW | pydantic/json_schema.py | 1568 | CODE | |
| LOW | pydantic/json_schema.py | 2449 | CODE | |
| LOW | pydantic/json_schema.py | 2453 | CODE | |
| LOW | pydantic/main.py | 317 | CODE | |
| LOW | pydantic/main.py | 393 | CODE | |
| LOW | pydantic/main.py | 1440 | CODE | |
| LOW | pydantic/main.py | 1095 | CODE | |
| LOW | pydantic/v1/_hypothesis_plugin.py | 356 | CODE | |
| LOW | pydantic/v1/fields.py | 197 | CODE | |
| LOW | pydantic/v1/fields.py | 581 | CODE | |
| LOW | pydantic/v1/fields.py | 850 | CODE | |
| LOW | pydantic/v1/fields.py | 898 | CODE | |
| LOW | pydantic/v1/fields.py | 1000 | CODE | |
| LOW | pydantic/v1/fields.py | 1053 | CODE | |
| LOW | pydantic/v1/fields.py | 1171 | CODE | |
| LOW | pydantic/v1/decorator.py | 61 | CODE | |
| LOW | pydantic/v1/decorator.py | 179 | CODE | |
| LOW | pydantic/v1/validators.py | 81 | CODE | |
| LOW | pydantic/v1/validators.py | 316 | CODE | |
| LOW | pydantic/v1/validators.py | 699 | CODE | |
| LOW | pydantic/v1/env_settings.py | 166 | CODE | |
| LOW | pydantic/v1/env_settings.py | 281 | CODE | |
| LOW | pydantic/v1/env_settings.py | 94 | CODE | |
| LOW | pydantic/v1/mypy.py | 171 | CODE | |
| LOW | pydantic/v1/mypy.py | 344 | CODE | |
| LOW | pydantic/v1/mypy.py | 539 | CODE | |
| LOW | pydantic/v1/class_validators.py | 195 | CODE | |
| LOW | pydantic/v1/class_validators.py | 288 | CODE | |
| LOW | pydantic/v1/class_validators.py | 322 | CODE | |
| 64 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_aliases.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | pydantic-core/tests/validators/test_typed_dict.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | pydantic-core/tests/validators/test_dataclasses.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | pydantic-core/tests/validators/test_model_fields.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | pydantic-core/tests/validators/test_arguments.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | …antic-core/tests/validators/arguments_v3/test_alias.py | 0 | this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take p | STRING |
| HIGH | tests/mypy/modules/decorator_implicit_classmethod.py | 0 | test that the mypy plugin implicitly transforms the right decorators into class methods. | STRING |
| HIGH | …yproject-plugin_toml/decorator_implicit_classmethod.py | 0 | test that the mypy plugin implicitly transforms the right decorators into class methods. | STRING |
| HIGH | …puts/mypy-plugin_ini/decorator_implicit_classmethod.py | 0 | test that the mypy plugin implicitly transforms the right decorators into class methods. | STRING |
| HIGH | pydantic-core/tests/serializers/test_model.py | 0 | this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime val | STRING |
| HIGH | pydantic-core/tests/serializers/test_typed_dict.py | 0 | this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime val | STRING |
| HIGH | pydantic-core/tests/serializers/test_dataclasses.py | 0 | this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime val | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/typechecking/decorators.py | 209 | CODE | |
| LOW | tests/typechecking/decorators.py | 214 | CODE | |
| LOW | tests/typechecking/decorators.py | 219 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 651 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 713 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 780 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 850 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 954 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1081 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1147 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1217 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1290 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1625 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1777 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1840 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 1899 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 2032 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 2581 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 2692 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 2757 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3071 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3201 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3276 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3376 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3514 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3626 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 3986 | CODE | |
| LOW | pydantic-core/python/pydantic_core/core_schema.py | 4055 | CODE | |
| LOW | pydantic-core/tests/validators/test_model.py | 230 | CODE | |
| LOW | pydantic/fields.py | 931 | CODE | |
| LOW | pydantic/fields.py | 971 | CODE | |
| LOW | pydantic/fields.py | 1011 | CODE | |
| LOW | pydantic/fields.py | 1054 | CODE | |
| LOW | pydantic/fields.py | 1094 | CODE | |
| LOW | pydantic/fields.py | 1137 | CODE | |
| LOW | pydantic/fields.py | 1175 | CODE | |
| LOW | pydantic/fields.py | 1697 | CODE | |
| LOW | pydantic/fields.py | 1713 | CODE | |
| LOW | pydantic/mypy.py | 1252 | CODE | |
| LOW | pydantic/types.py | 757 | CODE | |
| LOW | pydantic/types.py | 1051 | CODE | |
| LOW | pydantic/networks.py | 472 | CODE | |
| LOW | pydantic/root_model.py | 120 | CODE | |
| LOW | pydantic/type_adapter.py | 574 | CODE | |
| LOW | pydantic/type_adapter.py | 638 | CODE | |
| LOW | pydantic/dataclasses.py | 33 | CODE | |
| LOW | pydantic/dataclasses.py | 51 | CODE | |
| LOW | pydantic/dataclasses.py | 66 | CODE | |
| LOW | pydantic/main.py | 455 | CODE | |
| LOW | pydantic/main.py | 521 | CODE | |
| LOW | pydantic/main.py | 1391 | CODE | |
| LOW | pydantic/v1/fields.py | 221 | CODE | |
| LOW | pydantic/v1/types.py | 449 | CODE | |
| LOW | pydantic/v1/networks.py | 187 | CODE | |
| LOW | pydantic/v1/dataclasses.py | 176 | CODE | |
| LOW | pydantic/v1/dataclasses.py | 106 | CODE | |
| LOW | pydantic/v1/dataclasses.py | 123 | CODE | |
| LOW | pydantic/v1/dataclasses.py | 143 | CODE | |
| LOW | pydantic/v1/dataclasses.py | 159 | CODE | |
| LOW | pydantic/v1/main.py | 484 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_dataclasses.py | 3221 | def update_schema(schema: dict[str, Any]) -> None: | CODE |
| LOW | release/prepare.py | 23 | def update_version(new_version: str, dry_run: bool) -> None: | CODE |
| LOW | release/prepare.py | 100 | def update_history(new_version: str, dry_run: bool, force_update: bool) -> None: | CODE |
| LOW | pydantic-core/python/pydantic_core/__init__.py | 43 | __all__ = [ | CODE |
| LOW | pydantic/fields.py | 1635 | def _update_from_config(self, config_wrapper: ConfigWrapper, name: str) -> None: | CODE |
| LOW | pydantic/mypy.py | 1022 | def set_frozen(self, fields: list[PydanticModelField], api: SemanticAnalyzerPluginInterface, frozen: bool) -> None: | CODE |
| LOW | pydantic/json_schema.py | 1654 | def _update_class_schema(self, json_schema: JsonSchemaValue, cls: type[Any], config: ConfigDict) -> None: | CODE |
| LOW | pydantic/networks.py | 41 | __all__ = [ | CODE |
| LOW | pydantic/main.py | 1676 | def update_forward_refs(cls, **localns: Any) -> None: # noqa: D102 | CODE |
| LOW | pydantic/v1/fields.py | 197 | def update_from_config(self, from_config: Dict[str, Any]) -> None: | CODE |
| LOW | pydantic/v1/fields.py | 516 | def set_config(self, config: Type['BaseConfig']) -> None: | CODE |
| LOW | pydantic/v1/fields.py | 557 | def _set_default_and_type(self) -> None: | CODE |
| LOW | pydantic/v1/__init__.py | 22 | __all__ = [ | CODE |
| LOW | pydantic/v1/mypy.py | 539 | def set_frozen(self, fields: List['PydanticModelField'], frozen: bool) -> None: | CODE |
| LOW | pydantic/v1/types.py | 58 | __all__ = [ | CODE |
| LOW | pydantic/v1/networks.py | 72 | __all__ = [ | CODE |
| LOW | pydantic/v1/utils.py | 225 | def update_not_none(mapping: Dict[Any, Any], **update: Any) -> None: | CODE |
| LOW | pydantic/v1/dataclasses.py | 92 | __all__ = [ | CODE |
| LOW | pydantic/v1/typing.py | 537 | def update_field_forward_refs(field: 'ModelField', globalns: Any, localns: Any) -> None: | CODE |
| LOW | pydantic/v1/main.py | 833 | def update_forward_refs(cls, **localns: Any) -> None: | CODE |
| LOW | pydantic/_internal/_model_construction.py | 543 | def set_default_hash_func(cls: type[BaseModel], bases: tuple[type[Any], ...]) -> None: | CODE |
| LOW | pydantic/_internal/_model_construction.py | 730 | def set_deprecated_descriptors(cls: type[BaseModel]) -> None: | CODE |
| LOW | pydantic/_internal/_discriminated_union.py | 29 | def set_discriminator_in_metadata(schema: CoreSchema, discriminator: Any) -> None: | CODE |
| LOW | pydantic/_internal/_discriminated_union.py | 478 | def _set_unique_choice_for_values(self, choice: core_schema.CoreSchema, values: Sequence[str | int]) -> None: | CODE |
| LOW | pydantic/_internal/_decorators.py | 490 | def update_from_config(self, config_wrapper: ConfigWrapper) -> None: | CODE |
| LOW⚡ | pydantic/_internal/_fields.py | 120 | def _update_fields_from_docstrings(cls: type[Any], fields: dict[str, FieldInfo], use_inspect: bool = False) -> None: | CODE |
| LOW | pydantic/_internal/_fields.py | 190 | def update_field_from_config(config_wrapper: ConfigWrapper, field_name: str, field_info: FieldInfo) -> None: | CODE |
| LOW | pydantic/_internal/_mock_val_ser.py | 112 | def set_type_adapter_mocks(adapter: TypeAdapter) -> None: | CODE |
| LOW | pydantic/_internal/_mock_val_ser.py | 151 | def set_model_mocks(cls: type[BaseModel], undefined_name: str | None = None) -> None: | CODE |
| LOW | pydantic/_internal/_mock_val_ser.py | 192 | def set_dataclass_mocks(cls: type[PydanticDataclass], undefined_name: str | None = None) -> None: | CODE |
| LOW | pydantic/_internal/_utils.py | 142 | def update_not_none(mapping: dict[Any, Any], **update: Any) -> None: | CODE |
| LOW | pydantic/experimental/pipeline.py | 27 | __all__ = ['validate_as', 'validate_as_deferred', 'transform'] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_validators.py | 3131 | ) # Create a Sub instance without triggering validation (e.g., using model_construct) | CODE |
| MEDIUM | tests/test_main.py | 3052 | # Defining a nested type does not error | COMMENT |
| MEDIUM⚡ | tests/test_types.py | 6550 | # Create a module that exists, but fails to import due to missing dependency | COMMENT |
| MEDIUM | pydantic/types.py | 995 | # Create an instance | STRING |
| MEDIUM | pydantic/json_schema.py | 102 | """This class is used to emit warnings produced during JSON schema generation. | STRING |
| MEDIUM | pydantic/json_schema.py | 2495 | """This method is responsible for ignoring warnings as desired, and for formatting the warning messages. | STRING |
| MEDIUM | pydantic/root_model.py | 136 | """This method is included just to get a more accurate return type for type checkers. | STRING |
| MEDIUM | pydantic/functional_serializers.py | 158 | """This method is used to get the Pydantic core schema of the class. | STRING |
| MEDIUM | pydantic/_internal/_model_construction.py | 371 | """This function is meant to behave like a BaseModel method to initialize private attributes. | STRING |
| MEDIUM | pydantic/_internal/_generate_schema.py | 2150 | # Create a new ComputedFieldInfo so that different type parametrizations of the same | COMMENT |
| MEDIUM | pydantic/_internal/_generate_schema.py | 2321 | # Create a new union schema, preserving the order of the union: | COMMENT |
| MEDIUM | pydantic/_internal/_discriminated_union.py | 74 | """This class is used to convert an input schema containing a union schema into one where that union is | STRING |
| MEDIUM | pydantic/_internal/_decorators.py | 762 | # Define the types we want to check against as a single tuple. | COMMENT |
| MEDIUM | pydantic/plugin/__init__.py | 55 | """This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator] | STRING |
| MEDIUM | pydantic/deprecated/config.py | 31 | """This class is only retained for backwards compatibility. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_dataclasses.py | 2254 | # for standard dataclasses, so we just use TypeAdapter to get validation for each. | COMMENT |
| MEDIUM | tests/test_edge_cases.py | 2240 | """This is primarily included in order to document the behavior / limitations of the `Hashable` type's validation lo | STRING |
| LOW | pydantic-core/tests/serializers/test_any.py | 348 | # because when recursion is detected and we're in mode python, we just return the value | COMMENT |
| LOW | pydantic-core/tests/serializers/test_any.py | 383 | # when recursion is detected and we're in mode python, we just return the value | COMMENT |
| LOW | pydantic/functional_validators.py | 277 | # we don't want to bother with further validation, just return the new value | STRING |
| LOW | pydantic/types.py | 1751 | # hence we just use `secret_display` | COMMENT |
| MEDIUM | pydantic/json_schema.py | 2837 | # for instance when "examples" is used as a property key. A more robust solution | COMMENT |
| LOW | pydantic/json_schema.py | 461 | # If a schema with the same CoreRef has been handled, just return a reference to it | COMMENT |
| LOW | pydantic/main.py | 1235 | # early if there are no keys to ignore (we would just return False later on anyway) | COMMENT |
| LOW | pydantic/v1/error_wrappers.py | 46 | # but recursive, therefore just use: | COMMENT |
| MEDIUM | pydantic/_internal/_docs_extraction.py | 97 | # making it way more robust. | COMMENT |
| LOW | pydantic/_internal/_validators.py | 74 | # otherwise we just return the value and let the next validator do the rest of the work | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_edge_cases.py | 1161 | ] | COMMENT |
| LOW | tests/test_edge_cases.py | 1181 | # class Model(BaseModel): | COMMENT |
| LOW | …sts/mypy/outputs/pyproject-default_toml/root_models.py | 61 | # MYPY: error: Argument "m1" to "Model" has incompatible type "int"; expected "Maybe[int]" [arg-type] | COMMENT |
| LOW | tests/mypy/outputs/mypy-default_ini/root_models.py | 61 | # MYPY: error: Argument "m1" to "Model" has incompatible type "int"; expected "Maybe[int]" [arg-type] | COMMENT |
| LOW | pydantic-core/tests/test.rs | 1 | #[cfg(test)] | COMMENT |
| LOW | pydantic-core/src/definitions.rs | 21 | COMMENT | |
| LOW | pydantic-core/src/validators/validation_state.rs | 21 | pub struct ValidationState<'a, 'py> { | COMMENT |
| LOW | pydantic-core/src/errors/location.rs | 81 | } | COMMENT |
| LOW | .github/workflows/third-party.yml | 1 | # This workflow is a daily cron job, inspired by: | COMMENT |
| LOW | pydantic/fields.py | 541 | "If you'd like support for this behavior, please open an issue on pydantic.", | COMMENT |
| LOW | pydantic/main.py | 1241 | # Resort to costly filtering of the __dict__ objects | COMMENT |
| LOW | pydantic/v1/_hypothesis_plugin.py | 41 | # them on-disk, and that's unsafe in general without being told *where* to do so. | COMMENT |
| LOW | pydantic/v1/generics.py | 221 | if not issubclass(base_model, GenericModel): | COMMENT |
| LOW | pydantic/_internal/_namespace_utils.py | 201 | # This is roughly what happens when we build a core schema for `Model`: | COMMENT |
| LOW | pydantic/_internal/_namespace_utils.py | 261 | # Adding `__type_params__` *before* `vars(typ)`, as the latter takes priority | COMMENT |
| LOW | pydantic/_internal/_discriminated_union.py | 101 | # this, the inference logic gets complicated very quickly, and could result in confusing | COMMENT |
| LOW | pydantic/_internal/_discriminated_union.py | 121 | # as an indication that, even if None is discovered as one of the union choices, we will not need to wrap | COMMENT |
| LOW | pydantic/_internal/_discriminated_union.py | 201 | # was flattened by pydantic_core. | COMMENT |
| LOW | pydantic/_internal/_fields.py | 341 | if assigned_value is PydanticUndefined: # no assignment, just a plain annotation | COMMENT |
| LOW | pydantic/_internal/_generics.py | 121 | The created submodel. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_config.py | 460 | def my_function(): | STRING |
| LOW | tests/test_config.py | 486 | def my_function(): | STRING |
| LOW⚡ | tests/test_types.py | 6039 | def my_function(y: type_hint): | CODE |
| LOW | tests/test_types.py | 7253 | def do_something(self): | CODE |
| LOW | tests/test_types.py | 7262 | def do_something(self): | CODE |
| LOW | pydantic-core/tests/test_errors.py | 87 | def my_function(input_value, info): | CODE |
| LOW | pydantic-core/tests/validators/test_function.py | 65 | def my_function(input_value, info): | CODE |
| LOW | pydantic-core/tests/validators/test_function.py | 100 | def my_function(input_value, info): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 26 | def my_function(a, b, c): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 69 | def my_function(a, b, c): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 83 | def my_function(a): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 93 | def my_function(a): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 177 | def my_function(a, b, c): | CODE |
| LOW | pydantic-core/tests/validators/test_call.py | 197 | def my_function(a): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pydantic-core/wasm-preview/worker.js | 28 | print(tty); | CODE |
| HIGH | pydantic-core/wasm-preview/worker.js | 32 | print(tty); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | pydantic/v1/mypy.py | 334 | for name, sym in self._ctx.cls.info.names.items(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pydantic/v1/mypy.py | 557 | # I don't know whether it's possible to hit this branch, but I've added it for safety | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/mypy/test_mypy.py | 228 | except Exception: | CODE |
| LOW | pydantic-core/wasm-preview/run_tests.py | 63 | except Exception: | CODE |
| LOW | pydantic/json_schema.py | 1230 | except Exception: | CODE |
| LOW | pydantic/v1/_hypothesis_plugin.py | 226 | except Exception: # pragma: no cover | CODE |
| LOW | pydantic/_internal/_core_utils.py | 87 | except Exception: | CODE |
| LOW | pydantic/_internal/_typing_extra.py | 342 | except Exception: | CODE |
| LOW | pydantic/plugin/_schema_validator.py | 119 | except Exception as exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_deprecated.py | 574 | CODE |