Repository Analysis

pydantic/pydantic

Data validation using Python type hints

14.2 Low AI signal View on GitHub

Analysis Overview

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).

14.2
Adjusted Score
14.2
Raw Score
100%
Time Factor
2026-07-13
Last Push
28.3K
Stars
Python
Language
239.2K
Lines of Code
705
Files
3.5K
Pattern Hits
2026-07-14
Scan Date
0.13
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 1HIGH 92MEDIUM 19LOW 3369

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers2753 hits · 2307 pts
SeverityFileLineSnippetContext
LOWtests/test_assert_in_validators.py23def test_assert_raises_validation_error():CODE
LOWtests/test_dunder_all.py13def test_explicit_reexports_exist() -> None:CODE
LOWtests/test_version.py31def test_version_attribute_is_present():CODE
LOWtests/test_version.py35def test_version_attribute_is_a_string():CODE
LOWtests/test_version.py39def test_check_pydantic_core_version() -> None:CODE
LOWtests/test_computed_fields.py69def test_computed_fields_json_schema():CODE
LOWtests/test_computed_fields.py217def test_properties_and_computed_fields():CODE
LOWtests/test_computed_fields.py244def test_computed_fields_repr():CODE
LOWtests/test_computed_fields.py426def test_private_computed_field():CODE
LOWtests/test_computed_fields.py546def test_abstractmethod_missing(bases: tuple[Any, ...]):CODE
LOWtests/test_computed_fields.py567 def __get_pydantic_core_schema__(cls, source: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema:CODE
LOWtests/test_computed_fields.py573def test_computed_fields_infer_return_type():CODE
LOWtests/test_computed_fields.py583def test_computed_fields_missing_return_type():CODE
LOWtests/test_computed_fields.py611 def my_aliased_computed_field_none(self) -> int:CODE
LOWtests/test_computed_fields.py660def test_alias_generator_defer_build() -> None:CODE
LOWtests/test_computed_fields.py740def test_multiple_references_to_schema(model_factory: Callable[[], Any]) -> None:CODE
LOWtests/test_computed_fields.py765def test_generic_computed_field():CODE
LOWtests/test_computed_fields.py796def test_computed_field_override_raises():CODE
LOWtests/test_computed_fields.py812def test_computed_field_excluded_from_model_dump_recursive() -> None:CODE
LOWtests/test_computed_fields.py828def test_computed_field_with_field_serializer():CODE
LOWtests/test_computed_fields.py844def test_computed_fields_exclude() -> None:CODE
LOWtests/test_computed_fields.py859def test_computed_fields_serialization_exclude_if() -> None:CODE
LOWtests/test_computed_fields.py881def test_computed_fields_serialization_exclude_if_from_annotated() -> None:CODE
LOWtests/test_v1.py34def test_isinstance_does_not_raise_deprecation_warnings():CODE
LOWtests/test_utils.py39def test_import_module_invalid():CODE
LOWtests/test_utils.py94def test_lenient_issubclass_with_generic_aliases():CODE
LOWtests/test_utils.py101def test_lenient_issubclass_is_lenient():CODE
LOWtests/test_utils.py318def test_deep_update_is_not_mutating():CODE
LOWtests/test_utils.py364def test_smart_deepcopy_immutable_non_sequence(obj, mocker):CODE
LOWtests/test_utils.py372def test_smart_deepcopy_empty_collection(empty_collection, mocker):CODE
LOWtests/test_utils.py382def test_smart_deepcopy_collection(collection, mocker):CODE
LOWtests/test_utils.py389def test_smart_deepcopy_error(error, mocker):CODE
LOWtests/test_utils.py439def test_on_lower_camel_zero_length():CODE
LOWtests/test_utils.py443def test_on_lower_camel_one_length():CODE
LOWtests/test_utils.py447def test_on_lower_camel_many_length():CODE
LOWtests/conftest.py32def _extract_source_code_from_function(function: FunctionType):CODE
LOWtests/conftest.py155 def generate_schema_call_counter(*args: Any, **kwargs: Any) -> Any:CODE
LOWtests/test_warnings.py5def test_pydantic_deprecation_warning():CODE
LOWtests/test_warnings.py13def test_pydantic_deprecation_warning_tailing_dot_in_message():CODE
LOWtests/test_warnings.py20def test_pydantic_deprecation_warning_calculated_expected_removal():CODE
LOWtests/test_decorators.py11def _two_pos_required_args_extra_optional(a, b, c=1, d=2, *, e=3):CODE
LOWtests/test_decorators.py19def _one_pos_required_arg_one_optional(a, b=1):CODE
LOWtests/test_decorators.py47def test_inspect_validator_error_wrap():CODE
LOWtests/test_decorators.py62def test_inspect_validator_error(mode):CODE
LOWtests/test_decorators.py76def test_inspect_field_serializer_no_signature() -> None:CODE
LOWtests/test_decorators.py100def test_inspect_annotated_serializer(obj, mode, expected):CODE
LOWtests/test_decorators.py105def test_inspect_annotated_serializer_invalid_number_of_arguments(mode):CODE
LOWtests/test_decorators.py114def test_plain_class_not_mutated() -> None:CODE
LOWtests/test_decorators.py128def test_decorator_info_not_mutated() -> None:CODE
LOWtests/test_types_typeddict.py89def test_typeddict_annotated_simple(TypedDict, req_no_req):CODE
LOWtests/test_types_typeddict.py109def test_typeddict_total_false(TypedDict, req_no_req):CODE
LOWtests/test_types_typeddict.py176def test_partial_new_typeddict(TypedDict):CODE
LOWtests/test_types_typeddict.py190def test_typeddict_extra_default(TypedDict):CODE
LOWtests/test_types_typeddict.py230 def __get_pydantic_core_schema__(CODE
LOWtests/test_types_typeddict.py311def test_typeddict_postponed_annotation(TypedDict):CODE
LOWtests/test_types_typeddict.py351def test_typeddict_from_attributes():CODE
LOWtests/test_types_typeddict.py383def test_typeddict_not_required_schema(TypedDict, req_no_req):CODE
LOWtests/test_types_typeddict.py414def test_typed_dict_inheritance_schema(TypedDict, req_no_req):CODE
LOWtests/test_types_typeddict.py449def test_typeddict_annotated_nonoptional_schema(TypedDict):CODE
LOWtests/test_types_typeddict.py529def test_generic_typeddict_in_concrete_model():CODE
2693 more matches not shown…
Unused Imports249 hits · 227 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py1CODE
LOWtests/test_types_typeddict.py15CODE
LOWtests/test_plugins.py1CODE
LOWtests/test_model_validator.py1CODE
LOWtests/test_typing.py7CODE
LOWtests/test_docs.py1CODE
LOWtests/test_docs.py41CODE
LOWtests/test_docs.py46CODE
LOWtests/test_docs.py51CODE
LOWtests/test_deprecated_validate_arguments.py3CODE
LOWtests/test_types_namedtuple.py7CODE
LOWtests/test_pipeline.py3CODE
LOWtests/test_titles.py14CODE
LOWtests/test_titles.py14CODE
LOWtests/mypy/test_mypy.py1CODE
LOWtests/mypy/test_mypy.py7CODE
LOWtests/mypy/test_mypy.py12CODE
LOWtests/mypy/test_mypy.py12CODE
LOWtests/mypy/modules/create_model_var.py1CODE
LOWtests/mypy/outputs/mypy-plugin_ini/create_model_var.py1CODE
LOWtests/benchmarks/test_discriminated_unions.py1CODE
LOWtests/benchmarks/test_fastapi_startup_generics.py3CODE
LOWtests/benchmarks/test_fastapi_startup_simple.py3CODE
LOWtests/benchmarks/basemodel_eq_performance.py1CODE
LOWtests/benchmarks/basemodel_eq_performance.py559CODE
LOWtests/benchmarks/basemodel_eq_performance.py560CODE
LOWdocs/plugins/conversion_table.py1CODE
LOWdocs/plugins/algolia.py4CODE
LOWdocs/plugins/main.py1CODE
LOWpydantic-core/python/pydantic_core/__init__.py1CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py8CODE
LOWpydantic-core/python/pydantic_core/__init__.py31CODE
LOWpydantic-core/python/pydantic_core/__init__.py31CODE
LOWpydantic-core/python/pydantic_core/__init__.py31CODE
LOWpydantic-core/python/pydantic_core/core_schema.py6CODE
LOWpydantic-core/tests/conftest.py1CODE
LOWpydantic-core/tests/test_typing.py1CODE
LOWpydantic-core/tests/test_strict.py1CODE
LOWpydantic-core/tests/serializers/test_union.py1CODE
LOWpydantic-core/tests/benchmarks/nested_schema.py1CODE
LOWpydantic-core/tests/benchmarks/complete_schema.py1CODE
189 more matches not shown…
Docstring Block Structure41 hits · 205 pts
SeverityFileLineSnippetContext
HIGH.github/actions/people/people.py364Make a GraphQL request to GitHub API. Args: settings: Configuration settings including API token quSTRING
HIGHpydantic/color.py114Returns the name of the color if it can be found in `COLORS_BY_VALUE` dictionary, otherwise returns the hexadeciSTRING
HIGHpydantic/color.py260Parse a tuple or list to get RGBA values. Args: value: A tuple or list. Returns: An `RGBA` tupSTRING
HIGHpydantic/color.py282Parse a string representing a color to an RGBA tuple. Possible formats for the input string include: * named cSTRING
HIGHpydantic/color.py356Parse the color value provided and return a number between 0 and 1. Args: value: An integer or string colorSTRING
HIGHpydantic/color.py383Parse an alpha value checking it's a valid float in the range 0 to 1. Args: value: The input value to parseSTRING
HIGHpydantic/color.py441Converts a float value between 0 and 1 (inclusive) to an integer between 0 and 255 (inclusive). Args: c: ThSTRING
HIGHpydantic/fields.py293Create a new `FieldInfo` object with the `Field` function. Args: default: The default value for theSTRING
HIGHpydantic/fields.py649Return a new `FieldInfo` instance from a `dataclasses.Field` instance. Args: dc_field: The `dataclaSTRING
HIGHpydantic/fields.py1215!!! abstract "Usage Documentation" [Fields](../concepts/fields.md) Create a field for objects that can be cSTRING
HIGHpydantic/fields.py1541!!! abstract "Usage Documentation" [Private Model Attributes](../concepts/models.md#private-model-attributes) STRING
HIGHpydantic/fields.py1729!!! abstract "Usage Documentation" [The `computed_field` decorator](../concepts/fields.md#the-computed_field-decSTRING
HIGHpydantic/json_schema.py224!!! abstract "Usage Documentation" [Customizing the JSON Schema Generation Process](../concepts/json_schema.md#cSTRING
HIGHpydantic/json_schema.py353Generates JSON schema definitions from a list of core schemas, pairing the generated definitions with a mapping STRING
HIGHpydantic/json_schema.py400Generates a JSON schema for a specified schema in a specified mode. Args: schema: A Pydantic model.STRING
HIGHpydantic/json_schema.py485Generate a JSON schema based on the input schema. Args: schema_or_field: The core schema toSTRING
HIGHpydantic/json_schema.py1736Resolve a JsonSchemaValue to the non-ref schema if it is a $ref schema. Args: json_schema: The scheSTRING
HIGHpydantic/root_model.py74Create a new model using the provided root object and update fields set. Args: root: The root objecSTRING
HIGHpydantic/type_adapter.py264Initialize the core schema, validator, and serializer for the type. Args: ns_resolver: The namespacSTRING
HIGHpydantic/type_adapter.py409Validate a Python object against the model. If validation fails, the resulting [`ValidationError`][pydantic_corSTRING
HIGHpydantic/dataclasses.py80!!! abstract "Usage Documentation" [`dataclasses`](../concepts/dataclasses.md) A decorator used to create aSTRING
HIGHpydantic/main.py630Compute the class name for parametrizations of generic classes. This method can be overridden to achieve a custSTRING
HIGHpydantic/main.py733Validate a pydantic model instance. If validation fails, the resulting [`ValidationError`][pydantic_core.ValidaSTRING
HIGHpydantic/main.py786!!! abstract "Usage Documentation" [JSON Parsing](../concepts/json.md#json-parsing) Validate the giSTRING
HIGHpydantic/main.py1792!!! abstract "Usage Documentation" [Dynamic Model Creation](../concepts/models.md#dynamic-model-creation) DSTRING
HIGHpydantic/annotated_handlers.py51Get the real schema for a `{"$ref": ...}` schema. If the schema given is not a `$ref` schema, it will be returneSTRING
HIGHpydantic/annotated_handlers.py101Get the real schema for a `definition-ref` schema. If the schema given is not a `definition-ref` schema, it willSTRING
HIGHpydantic/_internal/_schema_generation_shared.py41Resolves `$ref` in the json schema. This returns the input json schema if there is no `$ref` in json schema. STRING
HIGHpydantic/_internal/_schema_generation_shared.py104Resolves reference in the core schema. Args: maybe_ref_schema: The input core schema that may contaSTRING
HIGHpydantic/_internal/_decorators_v1.py55Wrap a V1 style field validator for V2 compatibility. Args: validator: The V1 style field validator. RSTRING
HIGHpydantic/_internal/_known_annotated_metadata.py172Apply `annotation` to `schema` if it is an annotation we know about (Gt, Le, etc.). Otherwise return `None`. ThSTRING
HIGHpydantic/_internal/_model_construction.py413Iterate over the namespace and: * gather private attributes * check for items which look like fields but are notSTRING
HIGHpydantic/_internal/_model_construction.py616Finish building a model class. This logic must be called after class has been created since validation functions muSTRING
HIGHpydantic/_internal/_generate_schema.py703Generate core schema. Args: obj: The object to generate core schema for. Returns: STRING
HIGHpydantic/_internal/_discriminated_union.py39Applies the discriminator and returns a new core schema. Args: schema: The input schema. discriminaSTRING
HIGHpydantic/_internal/_discriminated_union.py141Return a new CoreSchema based on `schema` that uses a tagged-union with the discriminator provided to this classSTRING
HIGHpydantic/_internal/_decorators.py351Get the attribute from the next class in the MRO that has it, aiming to simulate calling the method on the actual clSTRING
HIGHpydantic/_internal/_decorators.py386Get an attribute out of the `__dict__` following the MRO. This prevents the call to `__get__` on the descriptor, andSTRING
HIGHpydantic/_internal/_fields.py230Collect the fields and class variables names of a nascent Pydantic model. The fields collection process is *lenientSTRING
HIGHpydantic/_internal/_generics.py166Used inside a function to check whether it was called globally. Args: depth: The depth to get the frame. STRING
HIGHpydantic/_internal/_dataclasses.py93Finish building a pydantic dataclass. This logic is called on a class which has already been wrapped in `dataclasseSTRING
Cross-Language Confusion36 hits · 178 pts
SeverityFileLineSnippetContext
HIGHtests/test_serialize.py246 assert MyModel(x=None).model_dump_json() == '{"x":null}'CODE
HIGHtests/test_edge_cases.py2227 '{"v": null}',CODE
HIGHtests/test_json.py328 == '{"name":"Pumbaa","SSN":234,"birthday":737424000.0,"phone":18007267864,"friend":null}'CODE
HIGHtests/test_types.py4400 Foobar.model_validate_json('{"password": 1234, "empty_password": null}')CODE
HIGHpydantic-core/tests/test_json.py185 assert v.validate_json('{"1": 1, "2": "a", "3": null}') == {'1': 1, '2': 'a', '3': None}CODE
HIGHpydantic-core/tests/serializers/test_model.py315 assert s.to_json(BasicModel(foo=None, bar=b'more')) == b'{"foo":null,"bar":"more"}'CODE
HIGHpydantic-core/tests/serializers/test_model.py827 s.to_json(Model(3, 4), exclude_none=False, by_alias=True) == b'{"width":3,"height":4,"Area":12,"volume":null}'CODE
HIGHpydantic-core/tests/serializers/test_model.py883 s.to_json(Model(3, 4), exclude_none=False, by_alias=True) == b'{"width":3,"height":4,"volume":null,"Area":12}'CODE
HIGHpydantic-core/tests/serializers/test_model.py1090 assert s.to_json(m) == b'{"field_a":"test","field_b":12,"field_c":null,"field_d":[1,2,3]}'CODE
HIGHpydantic-core/tests/serializers/test_model.py1104 assert s.to_json(m, exclude={'field_d': [0]}) == b'{"field_a":"test","field_b":12,"field_c":null,"field_d":[2,3]}'CODE
HIGHpydantic-core/tests/serializers/test_typed_dict.py156 assert v.to_json({'foo': 1, 'bar': b'more', 'c': None}) == b'{"foo":1,"bar":"more","c":null}'CODE
HIGHpydantic-core/tests/serializers/test_typed_dict.py157 assert v.to_json({'foo': None, 'bar': b'more'}) == b'{"foo":null,"bar":"more"}'CODE
HIGHpydantic-core/tests/serializers/test_any.py656 assert s.to_json([inf]) == b'[null]'CODE
HIGHpydantic-core/tests/serializers/test_any.py659 assert s.to_json([nan]) == b'[null]'CODE
HIGHpydantic-core/tests/serializers/test_json.py23 assert s.to_json(v) == b'["a",[1,2],null]'CODE
HIGHpydantic/json_schema.py1505 with self._config_wrapper_stack.push(config):CODE
HIGHpydantic/json_schema.py1647 with self._config_wrapper_stack.push(config):CODE
HIGHpydantic/json_schema.py1858 with self._config_wrapper_stack.push(config):CODE
HIGHpydantic/_internal/_typing_extra.py328 with ns_resolver.push(base):CODE
HIGHpydantic/_internal/_typing_extra.py382 with ns_resolver.push(base):CODE
HIGHpydantic/_internal/_namespace_utils.py202 with ns_resolver.push(Model):STRING
HIGHpydantic/_internal/_namespace_utils.py209 with ns_resolver.push(Sub):STRING
HIGHpydantic/_internal/_generate_schema.py758 with self._config_wrapper_stack.push(config_wrapper), self._ns_resolver.push(cls):CODE
HIGHpydantic/_internal/_generate_schema.py1019 with self.model_type_stack.push(obj):CODE
HIGHpydantic/_internal/_generate_schema.py1275 with self.field_name_stack.push(name):CODE
HIGHpydantic/_internal/_generate_schema.py1352 with self._ns_resolver.push(origin):CODE
HIGHpydantic/_internal/_generate_schema.py1389 self.model_type_stack.push(typed_dict_cls),CODE
HIGHpydantic/_internal/_generate_schema.py1415 with self._config_wrapper_stack.push(config):CODE
HIGHpydantic/_internal/_generate_schema.py1518 self.model_type_stack.push(namedtuple_cls),CODE
HIGHpydantic/_internal/_generate_schema.py1584 with self.field_name_stack.push(name):CODE
HIGHpydantic/_internal/_generate_schema.py1634 with self.field_name_stack.push(name):CODE
HIGHpydantic/_internal/_generate_schema.py1822 self.model_type_stack.push(dataclass),CODE
HIGHpydantic/_internal/_generate_schema.py1852 with self._ns_resolver.push(dataclass), self._config_wrapper_stack.push(config):CODE
HIGHpydantic/_internal/_fields.py461 with ns_resolver.push(cls):CODE
HIGHpydantic/_internal/_fields.py569 with ns_resolver.push(base):CODE
HIGHpydantic/_internal/_fields.py666 with ns_resolver.push(cls):CODE
Fake / Example Data101 hits · 127 pts
SeverityFileLineSnippetContext
LOWREADME.md50 name: str = 'John Doe'CODE
LOWREADME.md57#> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]COMMENT
LOWtests/test_types_typeddict.py978 m = Model.model_validate({'a': {'name': 'John Doe', 'extra': 'something'}})CODE
LOWtests/test_types_typeddict.py980 assert m.model_dump() == {'a': {'name': 'John Doe', 'extra': 'something'}}CODE
LOWtests/test_rich_repr.py13 name: str = 'John Doe'CODE
LOWtests/test_rich_repr.py26 ('name', 'John Doe'),CODE
LOWtests/test_dataclasses.py561 name: str = 'John Doe'CODE
LOWtests/test_dataclasses.py570 assert fields['name'].default == 'John Doe'CODE
LOWtests/test_dataclasses.py614 name: str = 'John Doe'CODE
LOWtests/test_dataclasses.py642 'name': {'default': 'John Doe', 'title': 'Name', 'type': 'string'},CODE
LOWtests/test_config.py124 ('id: int = 1', 'bar=2', 'baz: Any', "name: str = 'John Doe'", 'foo: str', '**data'),CODE
LOWtests/test_config.py126 assert _equals(str(sig), "(id: int = 1, bar=2, *, baz: Any, name: str = 'John Doe', foo: str, **data) -> None")CODE
LOWtests/test_config.py111 name: str = 'John Doe'CODE
LOWtests/test_networks.py235 url = validate_url('http://user:@example.org')CODE
LOWtests/test_networks.py242 url = validate_url('http://:password@example.org')CODE
LOWtests/test_edge_cases.py2327 assert module.User(id=12).model_dump() == {'id': 12, 'name': 'Jane Doe'}CODE
LOWtests/test_edge_cases.py2800 data = {'age': 'John Doe'}CODE
LOWtests/test_edge_cases.py2320 name: str = 'Jane Doe'STRING
LOWtests/test_json_schema.py6395 b: Annotated[int, 'placeholder'] = ...CODE
LOWtests/test_model_signature.py53 name: str = 'John Doe'CODE
LOWtests/test_model_signature.py66 ('id: int = 1', 'bar=2', 'baz: Any', "name: str = 'John Doe'", 'foo: str', '**data'),CODE
LOWtests/test_model_signature.py69 assert _equals(str(sig), "(id: int = 1, bar=2, *, baz: Any, name: str = 'John Doe', foo: str, **data) -> None")CODE
LOWtests/test_types.py7050 assert Foo(baz=' uSeR@ExAmPlE.com ').baz == 'user@example.com'CODE
LOWdocs/index.md63 name: str = 'John Doe' # (2)!CODE
LOWdocs/index.md86 'name': 'John Doe',STRING
LOWdocs/index.md120 name: str = 'John Doe'CODE
LOWdocs/plugins/devtools_output.html22user: id=123 name='John Doe' signup_ts=datetime.datetime(2019, 6, 1, 12, 22) friends=[1234, 4567, 7890] address=Address(CODE
LOWdocs/integrations/devtools.md38 name='John Doe',CODE
LOWdocs/examples/queues.md38user1 = User(id=1, name='John Doe', email='john@example.com')CODE
LOWdocs/examples/queues.md39user2 = User(id=2, name='Jane Doe', email='jane@example.com')CODE
LOWdocs/examples/queues.md42#> Added to queue: {"id":1,"name":"John Doe","email":"john@example.com"}COMMENT
LOWdocs/examples/queues.md45#> Added to queue: {"id":2,"name":"Jane Doe","email":"jane@example.com"}COMMENT
LOWdocs/examples/queues.md59#> Validated user: User(id=1, name='John Doe', email='john@example.com')COMMENT
LOWdocs/examples/queues.md62#> Validated user: User(id=2, name='Jane Doe', email='jane@example.com')COMMENT
LOWdocs/examples/queues.md109user1 = User(id=1, name='John Doe', email='john@example.com')CODE
LOWdocs/examples/queues.md110user2 = User(id=2, name='Jane Doe', email='jane@example.com')CODE
LOWdocs/examples/queues.md113#> Added to queue: {"id":1,"name":"John Doe","email":"john@example.com"}COMMENT
LOWdocs/examples/queues.md116#> Added to queue: {"id":2,"name":"Jane Doe","email":"jane@example.com"}COMMENT
LOWdocs/examples/queues.md205 user1 = User(id=1, name='John Doe', email='john@example.com')CODE
LOWdocs/examples/queues.md206 user2 = User(id=2, name='Jane Doe', email='jane@example.com')CODE
LOWdocs/examples/files.md16 "name": "John Doe",CODE
LOWdocs/examples/files.md39#> name='John Doe' age=30 email='john@example.com'COMMENT
LOWdocs/examples/files.md97 "name": "John Doe",CODE
LOWdocs/examples/files.md102 "name": "Jane Doe",CODE
LOWdocs/examples/files.md128#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md128#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md142{"name": "John Doe", "age": 30, "email": "john@example.com"}CODE
LOWdocs/examples/files.md143{"name": "Jane Doe", "age": 25, "email": "jane@example.com"}CODE
LOWdocs/examples/files.md163#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md163#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md199#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md199#> [Person(name='John Doe', age=30, email='john@example.com'), Person(name='Jane Doe', age=25, email='jane@example.com')COMMENT
LOWdocs/examples/files.md209name = "John Doe"CODE
LOWdocs/examples/files.md233#> name='John Doe' age=30 email='john@example.com'COMMENT
LOWdocs/examples/files.md267#> name='John Doe' age=30 email='john@example.com'COMMENT
LOWdocs/examples/files.md303#> name='John Doe' age=30 email='john@example.com'COMMENT
LOWdocs/examples/files.md337#> name='John Doe' age=30 email='john@example.com'COMMENT
LOWdocs/concepts/json_schema.md939 'name': 'John Doe',CODE
LOWdocs/concepts/json_schema.md953 "name": "John Doe"STRING
LOWdocs/concepts/unions.md152user_01 = User(id=123, name='John Doe')CODE
41 more matches not shown…
Deep Nesting124 hits · 105 pts
SeverityFileLineSnippetContext
LOWtests/test_exports.py33CODE
LOWtests/test_exports.py39CODE
LOWdocs/plugins/main.py54CODE
LOWpydantic-core/wasm-preview/run_tests.py18CODE
LOWpydantic-core/tests/test_errors.py704CODE
LOWpydantic-core/tests/validators/test_string.py351CODE
LOWpydantic-core/tests/validators/test_url.py70CODE
LOWpydantic-core/tests/validators/test_url.py484CODE
LOWpydantic-core/tests/validators/test_url.py982CODE
LOWpydantic-core/tests/validators/test_url.py1038CODE
LOW.github/actions/people/people.py451CODE
LOW.github/actions/people/people.py497CODE
LOW.github/actions/people/people.py581CODE
LOWpydantic/fields.py481CODE
LOWpydantic/fields.py582CODE
LOWpydantic/fields.py841CODE
LOWpydantic/mypy.py188CODE
LOWpydantic/mypy.py371CODE
LOWpydantic/mypy.py586CODE
LOWpydantic/mypy.py919CODE
LOWpydantic/mypy.py1022CODE
LOWpydantic/mypy.py1047CODE
LOWpydantic/mypy.py1105CODE
LOWpydantic/types.py3074CODE
LOWpydantic/types.py1028CODE
LOWpydantic/json_schema.py2824CODE
LOWpydantic/json_schema.py200CODE
LOWpydantic/json_schema.py867CODE
LOWpydantic/json_schema.py910CODE
LOWpydantic/json_schema.py1392CODE
LOWpydantic/json_schema.py1486CODE
LOWpydantic/json_schema.py1568CODE
LOWpydantic/json_schema.py2449CODE
LOWpydantic/json_schema.py2453CODE
LOWpydantic/main.py317CODE
LOWpydantic/main.py393CODE
LOWpydantic/main.py1440CODE
LOWpydantic/main.py1095CODE
LOWpydantic/v1/_hypothesis_plugin.py356CODE
LOWpydantic/v1/fields.py197CODE
LOWpydantic/v1/fields.py581CODE
LOWpydantic/v1/fields.py850CODE
LOWpydantic/v1/fields.py898CODE
LOWpydantic/v1/fields.py1000CODE
LOWpydantic/v1/fields.py1053CODE
LOWpydantic/v1/fields.py1171CODE
LOWpydantic/v1/decorator.py61CODE
LOWpydantic/v1/decorator.py179CODE
LOWpydantic/v1/validators.py81CODE
LOWpydantic/v1/validators.py316CODE
LOWpydantic/v1/validators.py699CODE
LOWpydantic/v1/env_settings.py166CODE
LOWpydantic/v1/env_settings.py281CODE
LOWpydantic/v1/env_settings.py94CODE
LOWpydantic/v1/mypy.py171CODE
LOWpydantic/v1/mypy.py344CODE
LOWpydantic/v1/mypy.py539CODE
LOWpydantic/v1/class_validators.py195CODE
LOWpydantic/v1/class_validators.py288CODE
LOWpydantic/v1/class_validators.py322CODE
64 more matches not shown…
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHtests/test_aliases.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGHpydantic-core/tests/validators/test_typed_dict.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGHpydantic-core/tests/validators/test_dataclasses.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGHpydantic-core/tests/validators/test_model_fields.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGHpydantic-core/tests/validators/test_arguments.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGH…antic-core/tests/validators/arguments_v3/test_alias.py0this test reflects the priority that applies for config vs runtime validation alias configuration. runtime values take pSTRING
HIGHtests/mypy/modules/decorator_implicit_classmethod.py0test that the mypy plugin implicitly transforms the right decorators into class methods.STRING
HIGH…yproject-plugin_toml/decorator_implicit_classmethod.py0test that the mypy plugin implicitly transforms the right decorators into class methods.STRING
HIGH…puts/mypy-plugin_ini/decorator_implicit_classmethod.py0test that the mypy plugin implicitly transforms the right decorators into class methods.STRING
HIGHpydantic-core/tests/serializers/test_model.py0this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime valSTRING
HIGHpydantic-core/tests/serializers/test_typed_dict.py0this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime valSTRING
HIGHpydantic-core/tests/serializers/test_dataclasses.py0this test reflects the priority that applies for config vs runtime serialization alias configuration. if the runtime valSTRING
AI Structural Patterns60 hits · 46 pts
SeverityFileLineSnippetContext
LOWtests/typechecking/decorators.py209CODE
LOWtests/typechecking/decorators.py214CODE
LOWtests/typechecking/decorators.py219CODE
LOWpydantic-core/python/pydantic_core/core_schema.py651CODE
LOWpydantic-core/python/pydantic_core/core_schema.py713CODE
LOWpydantic-core/python/pydantic_core/core_schema.py780CODE
LOWpydantic-core/python/pydantic_core/core_schema.py850CODE
LOWpydantic-core/python/pydantic_core/core_schema.py954CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1081CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1147CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1217CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1290CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1625CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1777CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1840CODE
LOWpydantic-core/python/pydantic_core/core_schema.py1899CODE
LOWpydantic-core/python/pydantic_core/core_schema.py2032CODE
LOWpydantic-core/python/pydantic_core/core_schema.py2581CODE
LOWpydantic-core/python/pydantic_core/core_schema.py2692CODE
LOWpydantic-core/python/pydantic_core/core_schema.py2757CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3071CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3201CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3276CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3376CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3514CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3626CODE
LOWpydantic-core/python/pydantic_core/core_schema.py3986CODE
LOWpydantic-core/python/pydantic_core/core_schema.py4055CODE
LOWpydantic-core/tests/validators/test_model.py230CODE
LOWpydantic/fields.py931CODE
LOWpydantic/fields.py971CODE
LOWpydantic/fields.py1011CODE
LOWpydantic/fields.py1054CODE
LOWpydantic/fields.py1094CODE
LOWpydantic/fields.py1137CODE
LOWpydantic/fields.py1175CODE
LOWpydantic/fields.py1697CODE
LOWpydantic/fields.py1713CODE
LOWpydantic/mypy.py1252CODE
LOWpydantic/types.py757CODE
LOWpydantic/types.py1051CODE
LOWpydantic/networks.py472CODE
LOWpydantic/root_model.py120CODE
LOWpydantic/type_adapter.py574CODE
LOWpydantic/type_adapter.py638CODE
LOWpydantic/dataclasses.py33CODE
LOWpydantic/dataclasses.py51CODE
LOWpydantic/dataclasses.py66CODE
LOWpydantic/main.py455CODE
LOWpydantic/main.py521CODE
LOWpydantic/main.py1391CODE
LOWpydantic/v1/fields.py221CODE
LOWpydantic/v1/types.py449CODE
LOWpydantic/v1/networks.py187CODE
LOWpydantic/v1/dataclasses.py176CODE
LOWpydantic/v1/dataclasses.py106CODE
LOWpydantic/v1/dataclasses.py123CODE
LOWpydantic/v1/dataclasses.py143CODE
LOWpydantic/v1/dataclasses.py159CODE
LOWpydantic/v1/main.py484CODE
Modern Structural Boilerplate32 hits · 33 pts
SeverityFileLineSnippetContext
LOWtests/test_dataclasses.py3221 def update_schema(schema: dict[str, Any]) -> None:CODE
LOWrelease/prepare.py23def update_version(new_version: str, dry_run: bool) -> None:CODE
LOWrelease/prepare.py100def update_history(new_version: str, dry_run: bool, force_update: bool) -> None:CODE
LOWpydantic-core/python/pydantic_core/__init__.py43__all__ = [CODE
LOWpydantic/fields.py1635 def _update_from_config(self, config_wrapper: ConfigWrapper, name: str) -> None:CODE
LOWpydantic/mypy.py1022 def set_frozen(self, fields: list[PydanticModelField], api: SemanticAnalyzerPluginInterface, frozen: bool) -> None:CODE
LOWpydantic/json_schema.py1654 def _update_class_schema(self, json_schema: JsonSchemaValue, cls: type[Any], config: ConfigDict) -> None:CODE
LOWpydantic/networks.py41__all__ = [CODE
LOWpydantic/main.py1676 def update_forward_refs(cls, **localns: Any) -> None: # noqa: D102CODE
LOWpydantic/v1/fields.py197 def update_from_config(self, from_config: Dict[str, Any]) -> None:CODE
LOWpydantic/v1/fields.py516 def set_config(self, config: Type['BaseConfig']) -> None:CODE
LOWpydantic/v1/fields.py557 def _set_default_and_type(self) -> None:CODE
LOWpydantic/v1/__init__.py22__all__ = [CODE
LOWpydantic/v1/mypy.py539 def set_frozen(self, fields: List['PydanticModelField'], frozen: bool) -> None:CODE
LOWpydantic/v1/types.py58__all__ = [CODE
LOWpydantic/v1/networks.py72__all__ = [CODE
LOWpydantic/v1/utils.py225def update_not_none(mapping: Dict[Any, Any], **update: Any) -> None:CODE
LOWpydantic/v1/dataclasses.py92__all__ = [CODE
LOWpydantic/v1/typing.py537def update_field_forward_refs(field: 'ModelField', globalns: Any, localns: Any) -> None:CODE
LOWpydantic/v1/main.py833 def update_forward_refs(cls, **localns: Any) -> None:CODE
LOWpydantic/_internal/_model_construction.py543def set_default_hash_func(cls: type[BaseModel], bases: tuple[type[Any], ...]) -> None:CODE
LOWpydantic/_internal/_model_construction.py730def set_deprecated_descriptors(cls: type[BaseModel]) -> None:CODE
LOWpydantic/_internal/_discriminated_union.py29def set_discriminator_in_metadata(schema: CoreSchema, discriminator: Any) -> None:CODE
LOWpydantic/_internal/_discriminated_union.py478 def _set_unique_choice_for_values(self, choice: core_schema.CoreSchema, values: Sequence[str | int]) -> None:CODE
LOWpydantic/_internal/_decorators.py490 def update_from_config(self, config_wrapper: ConfigWrapper) -> None:CODE
LOWpydantic/_internal/_fields.py120def _update_fields_from_docstrings(cls: type[Any], fields: dict[str, FieldInfo], use_inspect: bool = False) -> None:CODE
LOWpydantic/_internal/_fields.py190def update_field_from_config(config_wrapper: ConfigWrapper, field_name: str, field_info: FieldInfo) -> None:CODE
LOWpydantic/_internal/_mock_val_ser.py112def set_type_adapter_mocks(adapter: TypeAdapter) -> None:CODE
LOWpydantic/_internal/_mock_val_ser.py151def set_model_mocks(cls: type[BaseModel], undefined_name: str | None = None) -> None:CODE
LOWpydantic/_internal/_mock_val_ser.py192def set_dataclass_mocks(cls: type[PydanticDataclass], undefined_name: str | None = None) -> None:CODE
LOWpydantic/_internal/_utils.py142def update_not_none(mapping: dict[Any, Any], **update: Any) -> None:CODE
LOWpydantic/experimental/pipeline.py27__all__ = ['validate_as', 'validate_as_deferred', 'transform']CODE
Self-Referential Comments15 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_validators.py3131 ) # Create a Sub instance without triggering validation (e.g., using model_construct)CODE
MEDIUMtests/test_main.py3052 # Defining a nested type does not errorCOMMENT
MEDIUMtests/test_types.py6550 # Create a module that exists, but fails to import due to missing dependencyCOMMENT
MEDIUMpydantic/types.py995 # Create an instanceSTRING
MEDIUMpydantic/json_schema.py102 """This class is used to emit warnings produced during JSON schema generation.STRING
MEDIUMpydantic/json_schema.py2495 """This method is responsible for ignoring warnings as desired, and for formatting the warning messages.STRING
MEDIUMpydantic/root_model.py136 """This method is included just to get a more accurate return type for type checkers.STRING
MEDIUMpydantic/functional_serializers.py158 """This method is used to get the Pydantic core schema of the class.STRING
MEDIUMpydantic/_internal/_model_construction.py371 """This function is meant to behave like a BaseModel method to initialize private attributes.STRING
MEDIUMpydantic/_internal/_generate_schema.py2150 # Create a new ComputedFieldInfo so that different type parametrizations of the sameCOMMENT
MEDIUMpydantic/_internal/_generate_schema.py2321 # Create a new union schema, preserving the order of the union:COMMENT
MEDIUMpydantic/_internal/_discriminated_union.py74 """This class is used to convert an input schema containing a union schema into one where that union isSTRING
MEDIUMpydantic/_internal/_decorators.py762 # Define the types we want to check against as a single tuple.COMMENT
MEDIUMpydantic/plugin/__init__.py55 """This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator]STRING
MEDIUMpydantic/deprecated/config.py31 """This class is only retained for backwards compatibility.STRING
AI Slop Vocabulary12 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/test_dataclasses.py2254 # for standard dataclasses, so we just use TypeAdapter to get validation for each.COMMENT
MEDIUMtests/test_edge_cases.py2240 """This is primarily included in order to document the behavior / limitations of the `Hashable` type's validation loSTRING
LOWpydantic-core/tests/serializers/test_any.py348 # because when recursion is detected and we're in mode python, we just return the valueCOMMENT
LOWpydantic-core/tests/serializers/test_any.py383 # when recursion is detected and we're in mode python, we just return the valueCOMMENT
LOWpydantic/functional_validators.py277 # we don't want to bother with further validation, just return the new valueSTRING
LOWpydantic/types.py1751 # hence we just use `secret_display`COMMENT
MEDIUMpydantic/json_schema.py2837 # for instance when "examples" is used as a property key. A more robust solutionCOMMENT
LOWpydantic/json_schema.py461 # If a schema with the same CoreRef has been handled, just return a reference to itCOMMENT
LOWpydantic/main.py1235 # early if there are no keys to ignore (we would just return False later on anyway)COMMENT
LOWpydantic/v1/error_wrappers.py46# but recursive, therefore just use:COMMENT
MEDIUMpydantic/_internal/_docs_extraction.py97 # making it way more robust.COMMENT
LOWpydantic/_internal/_validators.py74 # otherwise we just return the value and let the next validator do the rest of the workCOMMENT
Over-Commented Block20 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/test_edge_cases.py1161 ]COMMENT
LOWtests/test_edge_cases.py1181# class Model(BaseModel):COMMENT
LOW…sts/mypy/outputs/pyproject-default_toml/root_models.py61# MYPY: error: Argument "m1" to "Model" has incompatible type "int"; expected "Maybe[int]" [arg-type]COMMENT
LOWtests/mypy/outputs/mypy-default_ini/root_models.py61# MYPY: error: Argument "m1" to "Model" has incompatible type "int"; expected "Maybe[int]" [arg-type]COMMENT
LOWpydantic-core/tests/test.rs1#[cfg(test)]COMMENT
LOWpydantic-core/src/definitions.rs21COMMENT
LOWpydantic-core/src/validators/validation_state.rs21pub struct ValidationState<'a, 'py> {COMMENT
LOWpydantic-core/src/errors/location.rs81}COMMENT
LOW.github/workflows/third-party.yml1# This workflow is a daily cron job, inspired by:COMMENT
LOWpydantic/fields.py541 "If you'd like support for this behavior, please open an issue on pydantic.",COMMENT
LOWpydantic/main.py1241 # Resort to costly filtering of the __dict__ objectsCOMMENT
LOWpydantic/v1/_hypothesis_plugin.py41# them on-disk, and that's unsafe in general without being told *where* to do so.COMMENT
LOWpydantic/v1/generics.py221 if not issubclass(base_model, GenericModel):COMMENT
LOWpydantic/_internal/_namespace_utils.py201 # This is roughly what happens when we build a core schema for `Model`:COMMENT
LOWpydantic/_internal/_namespace_utils.py261 # Adding `__type_params__` *before* `vars(typ)`, as the latter takes priorityCOMMENT
LOWpydantic/_internal/_discriminated_union.py101 # this, the inference logic gets complicated very quickly, and could result in confusingCOMMENT
LOWpydantic/_internal/_discriminated_union.py121 # as an indication that, even if None is discovered as one of the union choices, we will not need to wrapCOMMENT
LOWpydantic/_internal/_discriminated_union.py201 # was flattened by pydantic_core.COMMENT
LOWpydantic/_internal/_fields.py341 if assigned_value is PydanticUndefined: # no assignment, just a plain annotationCOMMENT
LOWpydantic/_internal/_generics.py121 The created submodel.COMMENT
Overly Generic Function Names14 hits · 12 pts
SeverityFileLineSnippetContext
LOWtests/test_config.py460 def my_function():STRING
LOWtests/test_config.py486 def my_function():STRING
LOWtests/test_types.py6039 def my_function(y: type_hint):CODE
LOWtests/test_types.py7253 def do_something(self):CODE
LOWtests/test_types.py7262 def do_something(self):CODE
LOWpydantic-core/tests/test_errors.py87 def my_function(input_value, info):CODE
LOWpydantic-core/tests/validators/test_function.py65 def my_function(input_value, info):CODE
LOWpydantic-core/tests/validators/test_function.py100 def my_function(input_value, info):CODE
LOWpydantic-core/tests/validators/test_call.py26 def my_function(a, b, c):CODE
LOWpydantic-core/tests/validators/test_call.py69 def my_function(a, b, c):CODE
LOWpydantic-core/tests/validators/test_call.py83 def my_function(a):CODE
LOWpydantic-core/tests/validators/test_call.py93 def my_function(a):CODE
LOWpydantic-core/tests/validators/test_call.py177 def my_function(a, b, c):CODE
LOWpydantic-core/tests/validators/test_call.py197 def my_function(a):CODE
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpydantic-core/wasm-preview/worker.js28 print(tty);CODE
HIGHpydantic-core/wasm-preview/worker.js32 print(tty);CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALpydantic/v1/mypy.py334 for name, sym in self._ctx.cls.info.names.items():CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHpydantic/v1/mypy.py557 # I don't know whether it's possible to hit this branch, but I've added it for safetyCOMMENT
Excessive Try-Catch Wrapping7 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/mypy/test_mypy.py228 except Exception:CODE
LOWpydantic-core/wasm-preview/run_tests.py63except Exception:CODE
LOWpydantic/json_schema.py1230 except Exception:CODE
LOWpydantic/v1/_hypothesis_plugin.py226 except Exception: # pragma: no coverCODE
LOWpydantic/_internal/_core_utils.py87 except Exception:CODE
LOWpydantic/_internal/_typing_extra.py342 except Exception:CODE
LOWpydantic/plugin/_schema_validator.py119 except Exception as exception:CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_deprecated.py574CODE