Repository Analysis

koxudaxi/datamodel-code-generator

Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.

17.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of koxudaxi/datamodel-code-generator, a Python project with 4,007 GitHub stars. SynthScan v2.0 examined 520,359 lines of code across 4566 source files, recording 9248 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 17.5 places this repository in the Moderate 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).

17.5
Adjusted Score
17.5
Raw Score
100%
Time Factor
2026-08-29
Last Push
4.0K
Stars
Python
Language
520.4K
Lines of Code
4.6K
Files
9.2K
Pattern Hits
2026-08-29
Scan Date
0.05
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 0HIGH 242MEDIUM 86LOW 8920

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 9248 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 Identifiers5187 hits · 3975 pts
SeverityFileLineSnippetContext
LOWtests/test_build_preset_docs_script.py34def test_build_preset_docs_check_is_up_to_date() -> None:CODE
LOWtests/test_build_preset_docs_script.py39def test_build_preset_docs_json_format() -> None:CODE
LOWtests/test_build_preset_docs_script.py51def test_build_preset_docs_check_help_mentions_all_generated_targets() -> None:CODE
LOWtests/test_build_preset_docs_script.py63def test_preset_metadata_renderers() -> None:CODE
LOWtests/test_build_preset_docs_script.py73def test_readme_supported_sections_are_rendered_from_enums() -> None:CODE
LOWtests/test_build_preset_docs_script.py81def test_marked_section_replacement_uses_end_marker_after_begin() -> None:CODE
LOWtests/test_build_preset_docs_script.py91def test_preset_config_supports_enum_backed_string_and_sequence_options() -> None:CODE
LOWtests/test_build_preset_docs_script.py120def test_dated_presets_keep_default_deserialization_immutable() -> None:CODE
LOWtests/test_build_preset_docs_script.py159def _render_preset_config_item(item: PresetConfigItem) -> str:CODE
LOWtests/test_update_command_help_on_markdown_script.py11def test_inject_recipe_quick_starts_replaces_ordered_markers() -> None:CODE
LOWtests/test_conftest_helpers.py251def test_assert_parser_modules_rejects_missing_expected_module(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py261def test_assert_parser_modules_rejects_unexpected_module(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py270def test_assert_inputs_not_mutated_allows_unchanged_nested_values() -> None:CODE
LOWtests/test_conftest_helpers.py278def test_assert_inputs_not_mutated_reports_nested_mutation() -> None:CODE
LOWtests/test_conftest_helpers.py46def test_assert_exact_directory_content_reports_diff(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py62def test_assert_file_content_matches_inline_snapshot_external_file(CODE
LOWtests/test_conftest_helpers.py83def test_assert_file_content_matches_inactive_external_file(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py99def test_assert_file_content_rejects_mismatched_inactive_external_file(CODE
LOWtests/test_conftest_helpers.py119def test_assert_file_content_missing_inline_snapshot_external_file(CODE
LOWtests/test_conftest_helpers.py145def test_assert_file_content_handles_storage_lookup_error(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py156 def raise_storage_lookup_error(_expected: object, _which: str) -> object:CODE
LOWtests/test_conftest_helpers.py167def test_assert_file_content_reports_failed_inline_snapshot_update(CODE
LOWtests/test_conftest_helpers.py201def test_assert_file_content_mismatched_inline_snapshot_external_file(CODE
LOWtests/test_conftest_helpers.py230def test_assert_parser_results_rejects_unexpected_result(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py240def test_assert_parser_results_rejects_missing_result(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py289def test_assert_path_cache_evicts_lru_entries_reports_first_mismatch(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py309def test_assert_path_cache_evicts_lru_entries_reports_second_mismatch(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py328def test_builtin_parity_mock_call_preservation(mocker: MockerFixture) -> None:CODE
LOWtests/test_conftest_helpers.py342def test_builtin_parity_prance_mock_detection(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_conftest_helpers.py353def test_builtin_parity_cli_formatter_helpers(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py385def test_builtin_parity_clear_output_path(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py399def test_default_formatter_cli_args(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py442def test_builtin_default_formatter_config(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py462def test_default_formatter_main_generation_detection() -> None:CODE
LOWtests/test_conftest_helpers.py474def test_default_formatter_generate_options(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py493def test_builtin_parity_generated_python_comparison(tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py512def test_builtin_cli_formatter_parity_file_path(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py549def test_builtin_cli_formatter_parity_stdin_path(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py578def test_builtin_generate_formatter_parity(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_conftest_helpers.py603def test_builtin_generate_formatter_parity_preserves_warnings(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py18def test_remote_lock_normalizes_request_headers_and_replaces_the_observed_closure(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py42def test_remote_lock_never_persists_url_or_request_secrets(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py65def test_remote_lock_request_identity_uses_only_safe_request_structure(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py117def test_remote_lock_commit_resolves_a_relative_target_from_the_current_directory(CODE
LOWtests/test_remote_lock.py131def test_nearest_existing_directory_rejects_a_nonexistent_path_root(CODE
LOWtests/test_remote_lock.py148def test_windows_staging_fallback_fails_closed_after_its_private_path_is_replaced(CODE
LOWtests/test_remote_lock.py172def test_windows_staging_fallback_rejects_a_replaced_anchor_before_creating_a_private_directory(CODE
LOWtests/test_remote_lock.py190def test_windows_staging_fallback_rejects_a_removed_anchor_before_creating_a_private_directory(CODE
LOWtests/test_remote_lock.py204def test_staging_directory_handles_deleted_sources_closed_handles_and_cleanup_failures(CODE
LOWtests/test_remote_lock.py261def test_staging_directory_fails_closed_for_unavailable_private_names(CODE
LOWtests/test_remote_lock.py284 def collide_with_reserved_name(*_args: object, **_kwargs: object) -> int:CODE
LOWtests/test_remote_lock.py306def test_staging_directory_path_fallback_cleanup_does_not_require_descriptors(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py330def test_descriptor_publication_error_and_rollback_primitives_preserve_private_entries(CODE
LOWtests/test_remote_lock.py424def test_descriptor_publication_copy_and_journal_failure_paths_use_real_files(CODE
LOWtests/test_remote_lock.py495 def fail_created_directory_removal(*_args: object, **_kwargs: object) -> None:CODE
LOWtests/test_remote_lock.py511def test_path_publication_helpers_preserve_modes_and_own_only_created_directories(CODE
LOWtests/test_remote_lock.py550def test_path_publication_helpers_preserve_posix_modes(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py564def test_remote_lock_legacy_staging_reuses_and_discards_one_private_file(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py581def test_remote_lock_commit_rejects_legacy_path_staging_without_leaking_a_temporary_file(tmp_path: Path) -> None:CODE
LOWtests/test_remote_lock.py599def test_remote_lock_stage_is_inactive_after_commit_or_without_update(tmp_path: Path) -> None:CODE
5127 more matches not shown…
Unused Imports2982 hits · 2923 pts
SeverityFileLineSnippetContext
LOWtests/test_build_preset_docs_script.py3CODE
LOWtests/test_update_command_help_on_markdown_script.py3CODE
LOWtests/test_conftest_helpers.py3CODE
LOWtests/test_remote_lock.py3CODE
LOWtests/test_reference.py3CODE
LOWtests/conftest.py3CODE
LOWtests/conftest.py1265CODE
LOWtests/conftest.py1266CODE
LOWtests/conftest.py1267CODE
LOWtests/conftest.py1268CODE
LOWtests/conftest.py1269CODE
LOWtests/conftest.py1271CODE
LOWtests/test_build_llms_txt_script.py3CODE
LOWtests/test_input_diff_timestamp.py3CODE
LOWtests/test_generate_changelog_script.py3CODE
LOWtests/test_yaml_backend.py3CODE
LOWtests/test_prompt.py3CODE
LOWtests/test_http_regressions.py3CODE
LOWtests/test_module_name.py3CODE
LOWtests/test_imports.py3CODE
LOWtests/test_deprecations.py3CODE
LOWtests/test_build_docs_examples_script.py3CODE
LOWtests/test_assert_helper_usage.py3CODE
LOWtests/test_util.py3CODE
LOWtests/test_select_ci_test_shard_script.py3CODE
LOWtests/test_python_type_runtime.py3CODE
LOWtests/test_validators.py3CODE
LOWtests/test_validate_release_draft_analysis_script.py3CODE
LOWtests/test_enums.py3CODE
LOWtests/test_input_model_transport.py3CODE
LOWtests/test_http.py3CODE
LOWtests/test_main_kr.py3CODE
LOWtests/test_check_overview_sync_script.py3CODE
LOWtests/test_build_playground_assets_script.py3CODE
LOWtests/test_package_metadata.py3CODE
LOWtests/test_build_architecture_docs_script.py3CODE
LOWtests/test_build_deprecation_docs_script.py3CODE
LOWtests/test_build_conformance_docs_script.py3CODE
LOWtests/test_architecture_boundaries.py3CODE
LOWtests/test_python_decorator.py3CODE
LOWtests/test_build_release_benchmark_docs_script.py3CODE
LOWtests/test_build_schema_docs_script.py3CODE
LOWtests/test_python_type_import_registry.py3CODE
LOWtests/test_resolver.py3CODE
LOWtests/test_infer_input_type.py3CODE
LOWtests/test_format.py3CODE
LOWtests/test_http_https.py3CODE
LOWtests/test_build_experimental_docs_script.py3CODE
LOWtests/test_experimental.py3CODE
LOWtests/test_input_model.py3CODE
LOWtests/test_types.py3CODE
LOWtests/test_types.py248CODE
LOWtests/test_types.py269CODE
LOWtests/test_types.py405CODE
LOWtests/test_types.py432CODE
LOWtests/test_types.py461CODE
LOWtests/test_types.py476CODE
LOWtests/test_types.py512CODE
LOWtests/test_types.py534CODE
LOWtests/test_types.py548CODE
2922 more matches not shown…
Cross-File Repetition202 hits · 1010 pts
SeverityFileLineSnippetContext
HIGHtests/test_http.py0keep tests that mock http requests independent from external dns.STRING
HIGHtests/parser/test_jsonschema.py0keep tests that mock http requests independent from external dns.STRING
HIGHtests/parser/test_openapi.py0keep tests that mock http requests independent from external dns.STRING
HIGHtests/parser/test_jsonschema.py0test that additional imports are inside imports container.STRING
HIGHtests/parser/test_openapi.py0test that additional imports are inside imports container.STRING
HIGHtests/parser/test_base.py0test that additional imports are inside imports container.STRING
HIGHtests/parser/test_jsonschema.py0test that not additional imports are not affecting imports container.STRING
HIGHtests/parser/test_openapi.py0test that not additional imports are not affecting imports container.STRING
HIGHtests/parser/test_base.py0test that not additional imports are not affecting imports container.STRING
HIGHtests/data/custom_file_header_docstring.txt0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…pi/modular_all_exports_children_docstring/_internal.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…enapi/modular_all_exports_children_docstring/models.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…api/modular_all_exports_children_docstring/__init__.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…/modular_all_exports_children_docstring/collections.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…/openapi/modular_all_exports_children_docstring/bar.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…modular_all_exports_children_docstring/foo/__init__.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…napi/modular_all_exports_children_docstring/foo/bar.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…modular_all_exports_children_docstring/woo/__init__.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…napi/modular_all_exports_children_docstring/woo/boo.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…ular_all_exports_children_docstring/nested/__init__.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…i/modular_all_exports_children_docstring/nested/foo.py0custom module docstring header. this is a multi-line docstring used for testing.STRING
HIGH…/data/custom_file_header_with_docstring_and_import.txt0custom module docstring. this module contains generated models.STRING
HIGHtests/data/custom_file_header_with_docstring.txt0custom module docstring. this module contains generated models.STRING
HIGH…penapi/custom_file_header_with_docstring_and_import.py0custom module docstring. this module contains generated models.STRING
HIGH…cted/main/openapi/custom_file_header_with_docstring.py0custom module docstring. this module contains generated models.STRING
HIGH…ema/custom_file_header_path_prepend_multi_file/user.py0custom module docstring. this module contains generated models.STRING
HIGH…ma/custom_file_header_path_prepend_multi_file/order.py0custom module docstring. this module contains generated models.STRING
HIGH…custom_file_header_path_prepend_multi_file/__init__.py0custom module docstring. this module contains generated models.STRING
HIGH…/custom_file_header_path_prepend_multi_file/product.py0custom module docstring. this module contains generated models.STRING
HIGHtests/data/python/input_model/dataclass_nested.py0enum that should be reused with reuse-foreign strategy.STRING
HIGHtests/data/python/input_model/typeddict_nested.py0enum that should be reused with reuse-foreign strategy.STRING
HIGHtests/data/python/input_model/nested_models.py0enum that should be reused with reuse-foreign strategy.STRING
HIGHtests/data/expected/parser/graphql/union-commented.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…sts/data/expected/parser/graphql/field-default-enum.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/parser/graphql/no_typename.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…sts/data/expected/parser/graphql/collection_options.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…expected/parser/graphql/collection_options_generate.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/parser/graphql/union_with_prefix.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/parser/graphql/union-aliased-bug.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ta/expected/skills/datamodel-code-generator/graphql.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ta/expected/main/graphql/union_description_cr_py312.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/additional_imports.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/interface_mro.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…xpected/main/graphql/pydantic_v2_empty_list_default.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/custom_formatters.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/enums.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/empty_list_default.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…/data/expected/main/graphql/union_class_name_prefix.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ed/main/graphql/simple_star_wars_extra_fields_allow.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…sts/data/expected/main/graphql/enums_no_specialized.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/simple_star_wars.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…d/main/graphql/simple_star_wars_dataclass_arguments.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ected/main/graphql/union_description_cr_pydantic_v2.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ta/expected/main/graphql/simple_star_wars_dataclass.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…n/graphql/graphql_serialization_aliases_pydantic_v2.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…expected/main/graphql/enums_ignore_enum_constraints.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ed/main/graphql/default_values_required_use_default.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/field_default_enum.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGHtests/data/expected/main/graphql/no_typename.py0the `boolean` scalar type represents `true` or `false`.STRING
HIGH…ata/expected/main/graphql/different_types_of_fields.py0the `boolean` scalar type represents `true` or `false`.STRING
142 more matches not shown…
Cross-Language Confusion37 hits · 204 pts
SeverityFileLineSnippetContext
HIGHtests/test_remote_lock.py695 ('{"version":1,"resources":[null]}', "each resource must be an object"),CODE
HIGHtests/test_build_release_benchmark_docs_script.py441 '{"releases": [null, {"version": "", "uploaded_at": "2026-06-19T00:00:00Z"}]}',CODE
HIGHtests/test_build_release_benchmark_docs_script.py476 non_object_entry.write_text('{"schema_version": 1, "metadata": {}, "entries": [null]}', encoding="utf-8")CODE
HIGHtests/parser/test_schema_version.py433 "null": {"default": Types.null},CODE
HIGHtests/parser/test_schema_version.py504 "null": {"default": Types.null},CODE
HIGHtests/model/test_dataclass_ordering.py133 assert DataModel.FIELD_DEFAULT_CLASSIFIER(undefined) == (False, False)CODE
HIGHtests/main/openapi/test_main_openapi.py2913 valid_json='{"requiredNullable": null, "nullableUnrequired": null}',CODE
HIGHtests/main/openapi/test_main_openapi.py4094 valid_json='{"metadataOnly": null, "newRequired": 1}',CODE
HIGHtests/main/payload_validation/conformance.py391 "OpenAPI msgspec full-matrix coverage remains representative until backend-specific enum, null, "CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py1060 valid_json='{"required": 1, "requiredNullable": null, "nullableUnrequired": null}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py1061 invalid_json='{"required": 1, "requiredNullable": null, "unrequired": null}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5602 invalid_json=('{"direct":[],"textOrList":[],"nullablePattern":{"name":null},"options":[{"name":""}]}'),CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5607 ('{"direct":["a","b","c"],"textOrList":[],"nullablePattern":{"name":null},"options":[{"name":""}]}'),CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5611 '{"direct":"","textOrList":[],"nullablePattern":{"name":null},"options":[{"name":[]}]}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5615 '{"direct":"","textOrList":[],"nullablePattern":{"name":null},"options":[{"name":1}]}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5619 '{"direct":"","textOrList":"x","nullablePattern":{"name":null},"options":[{"name":""}]}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5623 '{"direct":"","textOrList":[],"nullablePattern":{"name":null},"options":[]}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5589 '{"direct":"","textOrList":[],"nullablePattern":{"name":null},'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py5689 invalid_json=('{"direct":[],"textOrList":[],"nullablePattern":{"name":null},"options":[{"name":""}]}'),CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6674 '"rootMap":{"ok":2},"nullableValueMap":{"nil":null,"ok":1},'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6677 '"nullableAllOfValueMap":{"nil":null,"ok":5},'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6796 '"nullableValueMap":{"nil":null,"ok":1}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6816 '"nullableAllOfValueMap":{"nil":null,"ok":5}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6885 '"nullableAllOfValueMap":{"nil":null,"ok":5}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6904 '"nullableValueMap":{"nil":null,"ok":1}', '"nullableValueMap":null'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py8144 invalid_json='{"type":"s3","value":null}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py8286 valid_json='{"name":"root","child":{"name":"leaf"},"empty":null}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py12418 invalid_json='{"values":null}',CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py15548 '"jsonValues":[true,1],"nested":[["first"]],"nullableAnyOf":null}'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py15684 '"jsonValues":[true,1],"nested":[["first"]],"nullableAnyOf":null}'CODE
HIGHtests/main/jsonschema/test_main_jsonschema.py6360 """Test that type: [type, null] from $ref schema is propagated."""STRING
HIGHsrc/datamodel_code_generator/parser/schema_version.py659 "null": {"default": Types.null},CODE
HIGHsrc/datamodel_code_generator/parser/jsonschema.py1856 return self.data_type_manager.get_data_type(Types.null)CODE
HIGHsrc/datamodel_code_generator/parser/jsonschema.py2943 else self.data_type_manager.get_data_type(Types.null)CODE
HIGHsrc/datamodel_code_generator/parser/jsonschema.py9344 data_types.append(self.data_type_manager.get_data_type(Types.null))CODE
HIGHsrc/datamodel_code_generator/parser/jsonschema.py9464 return self.data_type_manager.get_data_type(Types.null)CODE
HIGHsrc/datamodel_code_generator/parser/jsonschema.py9481 data_type=self.data_type_manager.get_data_type(Types.null),CODE
Decorative Section Separators56 hits · 198 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_input_model.py811# ============================================================================COMMENT
MEDIUMtests/test_input_model.py813# ============================================================================COMMENT
MEDIUMtests/test_input_model.py919# ============================================================================COMMENT
MEDIUMtests/test_input_model.py921# ============================================================================COMMENT
MEDIUMtests/test_input_model.py991# ============================================================================COMMENT
MEDIUMtests/test_input_model.py993# ============================================================================COMMENT
MEDIUMtests/test_input_model.py1290# ============================================================================COMMENT
MEDIUMtests/test_input_model.py1292# ============================================================================COMMENT
MEDIUMtests/test_input_model.py1809# ============================================================================COMMENT
MEDIUMtests/test_input_model.py1811# ============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1279# =============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1281# =============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1087# =============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1089# =============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1342# =============================================================================COMMENT
MEDIUMtests/parser/test_schema_version.py1344# =============================================================================COMMENT
MEDIUMtests/main/test_performance.py1234# =============================================================================COMMENT
MEDIUMtests/main/test_performance.py1237# =============================================================================COMMENT
MEDIUMtests/data/openapi/type_alias_recursive.yaml10 # ----------------------------------------------------------------COMMENT
MEDIUMtests/data/openapi/type_alias_recursive.yaml12 # ----------------------------------------------------------------COMMENT
MEDIUMtests/data/openapi/type_alias_recursive.yaml57 # ----------------------------------------------------------------COMMENT
MEDIUMtests/data/openapi/type_alias_recursive.yaml59 # ----------------------------------------------------------------COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1342# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1344# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1353# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1355# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py178# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py180# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py350# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py352# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py678# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py680# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py912# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py914# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1097# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1099# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1258# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1260# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1318# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/arguments.py1320# ======================================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py887 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py889 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py891 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py893 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py166 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py168 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py182 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py184 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py434 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py436 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py497 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py499 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py700 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py702 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py839 # ==========================================================================COMMENT
MEDIUMsrc/datamodel_code_generator/cli_options.py841 # ==========================================================================COMMENT
Modern Structural Boilerplate184 hits · 184 pts
SeverityFileLineSnippetContext
LOWtests/parser/conftest.py7__all__ = ["auto_freeze_time", "output_file"]CODE
LOWtests/main/test_dynamic_models.py86def _setup_and_clear_cache() -> None:CODE
LOWtests/main/payload_validation/__init__.py46__all__ = [CODE
LOWtests/main/payload_validation/schema.py282def _set_default_openapi_object_type(schema: dict[str, Any]) -> None:CODE
LOWtests/main/payload_validation/schema.py291def _set_discriminator_mapping_enum(schema: dict[str, Any], source_schema: dict[str, Any]) -> None:CODE
LOWtests/main/payload_validation/schema.py444def _set_discriminator_property_constraint(schema: dict[str, Any], property_name: str, tags: list[str]) -> None:CODE
LOWtests/main/payload_validation/schema.py586def _set_payload_format_enum(schema: dict[str, Any]) -> None:CODE
LOWtests/data/architecture_boundaries/shared/forbidden.py3__all__ = ["stable_toposort"]CODE
LOWtests/data/python/decimal_compat.py7__all__ = ["Decimal"]CODE
LOW…on/custom_formatters/sibling_watch_package/__init__.py4__all__ = ["CodeFormatter"]CODE
LOW…tom_formatters/transactional_watch_package/__init__.py4__all__ = ["REVISION", "CodeFormatter"]CODE
LOW…thon/custom_formatters/stale_watch_package/__init__.py4__all__ = ["CodeFormatter"]CODE
LOW…m_formatters/stale_watch_package/package_refactored.py3__all__ = ["CodeFormatter"]CODE
LOW…napi_parser_parse_modular_pydantic_v2_ruff/__init__.py5__all__ = ["DifferentTea", "Error", "Id", "OptionalModel", "Result", "Source"]CODE
LOW…_parser_parse_modular_pydantic_v2_ruff/foo/__init__.py5__all__ = ["Cocoa", "Tea"]CODE
LOW…pi_parser_parse_modular_pydantic_v2_ruff/nested/foo.py6__all__ = ["ListModel", "Tea", "TeaClone"]CODE
LOW…arser/openapi/openapi_parser_parse_modular/__init__.py3__all__ = ["DifferentTea", "Error", "Id", "OptionalModel", "Result", "Source"]CODE
LOW…r/openapi/openapi_parser_parse_modular/foo/__init__.py3__all__ = ["Cocoa", "Tea"]CODE
LOW…ser/openapi/openapi_parser_parse_modular/nested/foo.py5__all__ = ["ListModel", "Tea", "TeaClone"]CODE
LOW…/datamodel-code-generator/directory_output/__init__.py8__all__ = [CODE
LOWtests/data/expected/main_kr/main_modular/__init__.py7__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…sts/data/expected/main_kr/main_modular/foo/__init__.py7__all__ = ["Cocoa", "Tea"]CODE
LOWtests/data/expected/main_kr/main_modular/nested/foo.py9__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…s/data/expected/main_kr/main_modular_no_file/output.py7__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…s/data/expected/main_kr/main_modular_no_file/output.py140__all__ = ["Cocoa", "Tea"]CODE
LOW…s/data/expected/main_kr/main_modular_no_file/output.py210__all__ = ["List", "Tea", "TeaClone"]CODE
LOWtests/data/expected/main_kr/jobs/modular_init.py6__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…api/modular_all_exports_children_docstring/__init__.py11__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…modular_all_exports_children_docstring/foo/__init__.py11__all__ = ["Cocoa", "Tea"]CODE
LOW…modular_all_exports_children_docstring/woo/__init__.py11__all__ = [CODE
LOW…i/modular_all_exports_children_docstring/nested/foo.py13__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…/main/openapi/no_use_type_checking_imports/__init__.py6__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…n/openapi/no_use_type_checking_imports/foo/__init__.py6__all__ = ["Cocoa", "Tea"]CODE
LOW…ain/openapi/no_use_type_checking_imports/nested/foo.py6__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…expected/main/openapi/all_exports_no_child/__init__.py8__all__ = [CODE
LOW…expected/main/openapi/modular_info_version/__init__.py10__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…neric_container_types_standard_collections/__init__.py7__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…c_container_types_standard_collections/foo/__init__.py7__all__ = ["Cocoa", "Tea"]CODE
LOW…ric_container_types_standard_collections/nested/foo.py9__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…penapi/circular_imports_different_prefixes/__init__.py7__all__ = ["Root"]CODE
LOW…penapi/circular_imports_different_prefixes/beta/sub.py7__all__ = ["Model"]CODE
LOW…enapi/circular_imports_different_prefixes/gamma/sub.py7__all__ = ["Model"]CODE
LOW…enapi/circular_imports_different_prefixes/alpha/sub.py7__all__ = ["Model"]CODE
LOW…_pydantic_ruff_defaults_to_runtime_imports/__init__.py8__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…antic_ruff_defaults_to_runtime_imports/foo/__init__.py8__all__ = ["Cocoa", "Tea"]CODE
LOW…ydantic_ruff_defaults_to_runtime_imports/nested/foo.py9__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…main/openapi/all_exports_with_local_models/__init__.py8__all__ = [CODE
LOW…/openapi/all_exports_with_local_models/pkg/__init__.py10__all__ = [CODE
LOW…format_code_fallback_on_error_init_exports/__init__.py6__all__ = ["DifferentTea", "Error", "Id", "Optional", "Result", "Source"]CODE
LOW…at_code_fallback_on_error_init_exports/foo/__init__.py6__all__ = ["Cocoa", "Tea"]CODE
LOW…at_code_fallback_on_error_init_exports/woo/__init__.py9__all__ = [CODE
LOW…rmat_code_fallback_on_error_init_exports/nested/foo.py6__all__ = ["List", "Tea", "TeaClone"]CODE
LOW…main/openapi/all_exports_collision_success/__init__.py9__all__ = [CODE
LOW…ted/main/openapi/modular_custom_class_name/__init__.py14__all__ = [CODE
LOW…main/openapi/modular_custom_class_name/foo/__init__.py7__all__ = ["CustomCocoa", "CustomTea"]CODE
LOW…d/main/openapi/modular_custom_class_name/nested/foo.py9__all__ = ["CustomList", "CustomTea", "CustomTeaClone"]CODE
LOW…in/openapi/circular_imports_mixed_prefixes/__init__.py7__all__ = ["Root"]CODE
LOW…ain/openapi/circular_imports_mixed_prefixes/other/x.py7__all__ = ["Model"]CODE
LOW…in/openapi/circular_imports_mixed_prefixes/common/a.py7__all__ = ["Model"]CODE
LOW…in/openapi/circular_imports_mixed_prefixes/common/c.py7__all__ = ["Model"]CODE
124 more matches not shown…
Excessive Try-Catch Wrapping126 hits · 171 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py1299 except Exception as e: # pragma: no coverCODE
LOWtests/test_infer_input_type.py49except Exception as exc:CODE
LOWtests/main/test_cli_fast_paths.py685 except Exception as exc:CODE
MEDIUMtests/main/conftest.py1262def _get_concurrent_interpreters_module() -> Any | None:CODE
LOWtests/main/conftest.py1300 except Exception as exception:STRING
LOWtests/main/conftest.py1317 except Exception as exception: # pragma: no coverSTRING
LOWtests/main/payload_validation/codegen.py87 except Exception as exception:CODE
LOWtests/main/payload_validation/codegen.py162 except Exception as exc:CODE
LOWtests/main/payload_validation/codegen.py193 except Exception as exc:CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py283 except Exception: # noqa: BLE001CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py290 except Exception: # noqa: BLE001CODE
LOW…pected/main/jsonschema/unique_items_union_enum_root.py211 except Exception: # noqa: BLE001CODE
LOW…pected/main/jsonschema/unique_items_union_enum_root.py218 except Exception: # noqa: BLE001CODE
LOW…hema/unique_items_variant_root_alias_use_type_alias.py234 except Exception: # noqa: BLE001CODE
LOW…hema/unique_items_variant_root_alias_use_type_alias.py241 except Exception: # noqa: BLE001CODE
LOW…n/jsonschema/unique_items_property_alias_population.py210 except Exception: # noqa: BLE001CODE
LOW…n/jsonschema/unique_items_property_alias_population.py217 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_schema_validators.py210 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_schema_validators.py217 except Exception: # noqa: BLE001CODE
LOW…ted/main/jsonschema/unique_items_additional_aliases.py233 except Exception: # noqa: BLE001CODE
LOW…ted/main/jsonschema/unique_items_additional_aliases.py240 except Exception: # noqa: BLE001CODE
LOW…main/jsonschema/unique_items_union_ref_sibling_2020.py210 except Exception: # noqa: BLE001CODE
LOW…main/jsonschema/unique_items_union_ref_sibling_2020.py217 except Exception: # noqa: BLE001CODE
LOW…_items_property_alias_serialization_alias_generator.py211 except Exception: # noqa: BLE001CODE
LOW…_items_property_alias_serialization_alias_generator.py218 except Exception: # noqa: BLE001CODE
LOW…chema/unique_items_additional_aliases_serialization.py234 except Exception: # noqa: BLE001CODE
LOW…chema/unique_items_additional_aliases_serialization.py241 except Exception: # noqa: BLE001CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py283 except Exception: # noqa: BLE001CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py290 except Exception: # noqa: BLE001CODE
LOW…ted/main/jsonschema/unique_items_variant_additional.py233 except Exception: # noqa: BLE001CODE
LOW…ted/main/jsonschema/unique_items_variant_additional.py240 except Exception: # noqa: BLE001CODE
LOW…ain/jsonschema/unique_items_draft7_additional_items.py210 except Exception: # noqa: BLE001CODE
LOW…ain/jsonschema/unique_items_draft7_additional_items.py217 except Exception: # noqa: BLE001CODE
LOW…/expected/main/jsonschema/unique_items_const_draft6.py210 except Exception: # noqa: BLE001CODE
LOW…/expected/main/jsonschema/unique_items_const_draft6.py217 except Exception: # noqa: BLE001CODE
LOW…d/main/jsonschema/unique_items_union_mapping_shapes.py211 except Exception: # noqa: BLE001CODE
LOW…d/main/jsonschema/unique_items_union_mapping_shapes.py218 except Exception: # noqa: BLE001CODE
LOW…main/jsonschema/unique_items_union_ref_mapping_root.py210 except Exception: # noqa: BLE001CODE
LOW…main/jsonschema/unique_items_union_ref_mapping_root.py217 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_variant_ownership.py210 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_variant_ownership.py217 except Exception: # noqa: BLE001CODE
LOW…ected/main/jsonschema/unique_items_union_const_root.py210 except Exception: # noqa: BLE001CODE
LOW…ected/main/jsonschema/unique_items_union_const_root.py217 except Exception: # noqa: BLE001CODE
LOW…ed/main/jsonschema/unique_items_prefix_items_draft7.py210 except Exception: # noqa: BLE001CODE
LOW…ed/main/jsonschema/unique_items_prefix_items_draft7.py217 except Exception: # noqa: BLE001CODE
LOW…sonschema/unique_items_property_alias_serialization.py210 except Exception: # noqa: BLE001CODE
LOW…sonschema/unique_items_property_alias_serialization.py217 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_union_ref_mapping.py233 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_union_ref_mapping.py240 except Exception: # noqa: BLE001CODE
LOW…xpected/main/jsonschema/unique_items_property_alias.py210 except Exception: # noqa: BLE001CODE
LOW…xpected/main/jsonschema/unique_items_property_alias.py217 except Exception: # noqa: BLE001CODE
LOW…_items_variant_root_alias_use_root_model_type_alias.py233 except Exception: # noqa: BLE001CODE
LOW…_items_variant_root_alias_use_root_model_type_alias.py240 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_prefix_items_2020.py210 except Exception: # noqa: BLE001CODE
LOW…cted/main/jsonschema/unique_items_prefix_items_2020.py217 except Exception: # noqa: BLE001CODE
LOW…chema/schema_validators_runtime_root_cross_module/a.py212 except Exception: # noqa: BLE001CODE
LOW…chema/schema_validators_runtime_root_cross_module/a.py219 except Exception: # noqa: BLE001CODE
LOW…rty_count_cross_module/external_core_required_child.py248 except Exception: # noqa: BLE001CODE
LOW…rty_count_cross_module/external_core_required_child.py255 except Exception: # noqa: BLE001CODE
LOW…erty_count_cross_module/external_core_unique_parent.py210 except Exception: # noqa: BLE001CODE
66 more matches not shown…
Deep Nesting202 hits · 154 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py193CODE
LOWtests/conftest.py548CODE
LOWtests/main/conftest.py843CODE
LOWtests/main/test_performance.py1273CODE
LOWtests/main/test_payload_validation.py542CODE
LOWtests/main/payload_validation/cases.py67CODE
LOWtests/main/payload_validation/schema.py127CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py24CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py80CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py140CODE
LOW…pected/main/jsonschema/unique_items_union_enum_root.py68CODE
LOW…alidators_property_count_root_collapse_generic_base.py30CODE
LOW…hema/unique_items_variant_root_alias_use_type_alias.py31CODE
LOW…hema/unique_items_variant_root_alias_use_type_alias.py91CODE
LOW…n/jsonschema/unique_items_property_alias_population.py67CODE
LOW…cted/main/jsonschema/unique_items_schema_validators.py67CODE
LOW…ted/main/jsonschema/unique_items_additional_aliases.py30CODE
LOW…ted/main/jsonschema/unique_items_additional_aliases.py90CODE
LOW…main/jsonschema/unique_items_union_ref_sibling_2020.py67CODE
LOW…sts/data/expected/main/jsonschema/schema_validators.py36CODE
LOW…_items_property_alias_serialization_alias_generator.py68CODE
LOW…chema/unique_items_additional_aliases_serialization.py31CODE
LOW…chema/unique_items_additional_aliases_serialization.py91CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py24CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py80CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py140CODE
LOW…ted/main/jsonschema/unique_items_variant_additional.py30CODE
LOW…ted/main/jsonschema/unique_items_variant_additional.py90CODE
LOW…ain/jsonschema/unique_items_draft7_additional_items.py67CODE
LOW…/expected/main/jsonschema/unique_items_const_draft6.py67CODE
LOW…d/main/jsonschema/unique_items_union_mapping_shapes.py68CODE
LOW…hema/schema_validators_property_count_root_collapse.py22CODE
LOW…main/jsonschema/unique_items_union_ref_mapping_root.py67CODE
LOW…/main/jsonschema/empty_field_name_schema_validators.py29CODE
LOW…ema/schema_validators_pattern_additional_properties.py22CODE
LOW…cted/main/jsonschema/unique_items_variant_ownership.py67CODE
LOW…ected/main/jsonschema/unique_items_union_const_root.py67CODE
LOW…jsonschema/schema_validators_custom_base_class_name.py22CODE
LOW…ed/main/jsonschema/unique_items_prefix_items_draft7.py67CODE
LOW…sonschema/unique_items_property_alias_serialization.py67CODE
LOW…rties_value_constraints_annotated_schema_validators.py31CODE
LOW…cted/main/jsonschema/unique_items_union_ref_mapping.py30CODE
LOW…cted/main/jsonschema/unique_items_union_ref_mapping.py90CODE
LOW…xpected/main/jsonschema/unique_items_property_alias.py67CODE
LOW…_items_variant_root_alias_use_root_model_type_alias.py30CODE
LOW…_items_variant_root_alias_use_root_model_type_alias.py90CODE
LOW…cted/main/jsonschema/unique_items_prefix_items_2020.py67CODE
LOW…chema/schema_validators_runtime_root_cross_module/a.py69CODE
LOW…rty_count_cross_module/external_core_pattern_parent.py22CODE
LOW…_validators_property_count_cross_module/core_parent.py22CODE
LOW…lidators_property_count_cross_module/property_child.py24CODE
LOW…a_validators_property_count_cross_module/core_child.py24CODE
LOW…rty_count_cross_module/external_core_required_child.py105CODE
LOW…erty_count_cross_module/external_core_unique_parent.py67CODE
LOW…perty_count_cross_module/external_core_unique_child.py26CODE
LOW…perty_count_cross_module/external_core_unique_child.py82CODE
LOW…perty_count_cross_module/external_core_unique_child.py142CODE
LOW…erty_count_cross_module/external_core_pattern_child.py26CODE
LOW…erty_count_cross_module/external_core_pattern_child.py120CODE
LOW…_count_cross_module/external_core_conditional_child.py91CODE
142 more matches not shown…
Over-Commented Block153 hits · 153 pts
SeverityFileLineSnippetContext
LOWtests/data/custom_file_header.txt1# multiline custom ;COMMENT
LOWtests/data/custom_file_header_comments_only.txt1# Just a commentCOMMENT
LOWtests/data/custom_file_header_fast_path.txt1 # Header comment containing """quotes""" and a semicolon;COMMENT
LOWtests/data/expected/http/public_remote_module_init.py1# generated by datamodel-codegen:COMMENT
LOW…sts/data/expected/main_kr/main_modular/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/data/expected/main_kr/main_modular/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…enapi/usable_identical_invalid_dotted_models_stdout.py21# generated by datamodel-codegen:COMMENT
LOW…enapi/usable_collapsed_invalid_dotted_models_stdout.py21# generated by datamodel-codegen:COMMENT
LOW…ain/openapi/nested_package_enum_default/io/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…api/nested_package_enum_default/io/example/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…nested_package_enum_default/io/example/api/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…n/openapi/no_use_type_checking_imports/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…penapi/no_use_type_checking_imports/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/openapi/all_exports_no_child/parent/child/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…openapi/module_class_name_collision_deep/A/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…c_container_types_standard_collections/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ontainer_types_standard_collections/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…i/circular_imports_different_prefixes/beta/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/circular_imports_different_prefixes/gamma/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/circular_imports_different_prefixes/alpha/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…antic_ruff_defaults_to_runtime_imports/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ic_ruff_defaults_to_runtime_imports/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…code_fallback_on_error_init_exports/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…enapi/serialize_as_any_module_import_alias/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…main/openapi/modular_custom_class_name/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…n/openapi/modular_custom_class_name/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…_class_name_collision_deep_exact_imports/A/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…napi/circular_imports_mixed_prefixes/other/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…api/circular_imports_mixed_prefixes/common/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…enapi/external_relative_ref/module_openapi/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ternal_relative_ref/module_openapi/modules/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…rsive_collision_avoided_by_renaming/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…pected/main/openapi/modular_typed_dict/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ted/main/openapi/modular_typed_dict/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…r_all_exports_recursive_full_prefix/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ected/main/openapi/modular_reuse_model/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ed/main/openapi/modular_reuse_model/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…penapi/modular_all_exports_children/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/expected/main/openapi/namespace_subns_ref/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…in/openapi/use_generic_container_types/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…openapi/use_generic_container_types/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…sts/data/expected/main/openapi/modular/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/data/expected/main/openapi/modular/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…enapi/modular_all_exports_recursive/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…main/openapi/dot_notation_deep_inheritance/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…imports_for_multi_module_pydantic_ruff/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…orts_for_multi_module_pydantic_ruff/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/main/openapi/use_standard_collections/woo/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…in/openapi/use_standard_collections/nested/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…cted/main/openapi/dot_notation_inheritance/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…i/dot_notation_root_package_inheritance/v0/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…pected/main/malformed/cross_file_empty_ref/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/main/jsonschema/reuse_type_overrides_tree/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ta/expected/main/jsonschema/non_dict_files/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…/expected/main/jsonschema/treat_dot_single/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…pected/main/jsonschema/treat_dot_single/v0/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…cted/main/jsonschema/treat_dot_single/v0/0/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…d/main/jsonschema/treat_dot_single/v0/0/39/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…ma/use_generic_base_class_deep_inheritance/__init__.py1# generated by datamodel-codegen:COMMENT
LOW…main/jsonschema/reuse_scope_tree_typeddict/__init__.py1# generated by datamodel-codegen:COMMENT
93 more matches not shown…
AI Structural Patterns74 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py1046CODE
LOWtests/main/conftest.py622CODE
LOWtests/main/conftest.py843CODE
LOWtests/main/test_public_api_signature_baseline.py263CODE
LOWtests/main/test_public_api_signature_baseline.py446CODE
LOWtests/main/test_public_api_signature_baseline.py483CODE
LOWtests/main/test_public_api_signature_baseline.py632CODE
LOW…ead_only_write_only_variant_graph_schema_validators.py18CODE
LOW…/expected/main/jsonschema/unique_items_inline_paths.py21CODE
LOW…pected/main/jsonschema/unique_items_union_enum_root.py19CODE
LOW…alidators_property_count_root_collapse_generic_base.py27CODE
LOW…hema/unique_items_variant_root_alias_use_type_alias.py20CODE
LOW…n/jsonschema/unique_items_property_alias_population.py18CODE
LOW…cted/main/jsonschema/unique_items_schema_validators.py18CODE
LOW…ted/main/jsonschema/unique_items_additional_aliases.py19CODE
LOW…main/jsonschema/unique_items_union_ref_sibling_2020.py18CODE
LOW…sts/data/expected/main/jsonschema/schema_validators.py33CODE
LOW…_items_property_alias_serialization_alias_generator.py19CODE
LOW…chema/unique_items_additional_aliases_serialization.py20CODE
LOW…expected/main/jsonschema/unique_items_allof_mapping.py21CODE
LOW…ted/main/jsonschema/unique_items_variant_additional.py19CODE
LOW…ain/jsonschema/unique_items_draft7_additional_items.py18CODE
LOW…ed/main/jsonschema/schema_validators_property_count.py28CODE
LOW…/expected/main/jsonschema/unique_items_const_draft6.py18CODE
LOW…d/main/jsonschema/unique_items_union_mapping_shapes.py19CODE
LOW…hema/schema_validators_property_count_root_collapse.py19CODE
LOW…main/jsonschema/unique_items_union_ref_mapping_root.py18CODE
LOW…/main/jsonschema/empty_field_name_schema_validators.py26CODE
LOW…ema/schema_validators_pattern_additional_properties.py19CODE
LOW…cted/main/jsonschema/unique_items_variant_ownership.py18CODE
LOW…ected/main/jsonschema/unique_items_union_const_root.py18CODE
LOW…jsonschema/schema_validators_custom_base_class_name.py19CODE
LOW…ed/main/jsonschema/unique_items_prefix_items_draft7.py18CODE
LOW…sonschema/unique_items_property_alias_serialization.py18CODE
LOW…rties_value_constraints_annotated_schema_validators.py28CODE
LOW…cted/main/jsonschema/unique_items_union_ref_mapping.py19CODE
LOW…xpected/main/jsonschema/unique_items_property_alias.py18CODE
LOW…_items_variant_root_alias_use_root_model_type_alias.py19CODE
LOW…cted/main/jsonschema/unique_items_prefix_items_2020.py18CODE
LOW…chema/schema_validators_runtime_root_cross_module/a.py20CODE
LOW…rty_count_cross_module/external_core_pattern_parent.py19CODE
LOW…_validators_property_count_cross_module/core_parent.py19CODE
LOW…tors_property_count_cross_module/conditional_parent.py18CODE
LOW…lidators_property_count_cross_module/property_child.py21CODE
LOW…a_validators_property_count_cross_module/core_child.py21CODE
LOW…rty_count_cross_module/external_core_required_child.py30CODE
LOW…erty_count_cross_module/external_core_unique_parent.py18CODE
LOW…perty_count_cross_module/external_core_unique_child.py23CODE
LOW…erty_count_cross_module/external_core_pattern_child.py23CODE
LOW…_count_cross_module/external_core_conditional_child.py22CODE
LOW…idators_property_count_cross_module/required_parent.py28CODE
LOW…rty_count_cross_module_generic_base/required_parent.py35CODE
LOWsrc/datamodel_code_generator/format.py518CODE
LOWsrc/datamodel_code_generator/types.py1217CODE
LOWsrc/datamodel_code_generator/http.py1090CODE
LOWsrc/datamodel_code_generator/reference.py290CODE
LOWsrc/datamodel_code_generator/reference.py613CODE
LOWsrc/datamodel_code_generator/reference.py1328CODE
LOWsrc/datamodel_code_generator/__main__.py2663CODE
LOWsrc/datamodel_code_generator/parser/base.py5853CODE
14 more matches not shown…
Fake / Example Data19 hits · 18 pts
SeverityFileLineSnippetContext
LOWtests/main/test_dynamic_models.py731 "Person": {"name": "John", "address": {"street": "123 Main St", "city": "NYC"}},CODE
LOW…expected/dynamic_models/generated_code_validation.json5 "street": "123 Main St",CODE
LOW…in_use_inline_field_description_with_example/output.py14 examples=['John Doe'],CODE
LOW…in_use_inline_field_description_with_example/output.py20 Example: 'John Doe'STRING
LOW…main_use_field_description_example_dataclass/output.py14 Example: 'John Doe'STRING
LOW…in_use_inline_field_description_example_only/output.py11 name: str | None = Field(None, description='User name.', examples=['John Doe'])CODE
LOW…in_use_inline_field_description_example_only/output.py13 Example: 'John Doe'STRING
LOW…xpected/main/jsonschema/external_files_in_directory.py48 name: str = Field(..., examples=['John Doe'])CODE
LOW…n/jsonschema/use_union_operator/definitions/friends.py16 name: str = Field(..., examples=['John Doe'])CODE
LOW…ain/jsonschema/nested_directory/definitions/friends.py16 name: str = Field(..., examples=['John Doe'])CODE
LOW…a/jsonschema/single_line_description_with_example.json9 "example": "John Doe"CODE
LOW…ata/jsonschema/multiline_description_with_example.json9 "example": "John Doe"CODE
LOWtests/data/jsonschema/allof_class_hierarchy.json115 "default": "123 Main St"CODE
LOW…a/external_files_in_directory/definitions/friends.json10 "example": "John Doe"CODE
LOWdocs/dynamic-model-generation.md118 address={"street": "123 Main St", "city": "NYC"}CODE
LOWdocs/dynamic-model-generation.md121# {'name': 'Bob', 'address': {'street': '123 Main St', 'city': 'NYC'}}COMMENT
LOWdocs/cli-reference/field-customization.md3804 "example": "John Doe"CODE
LOWdocs/cli-reference/field-customization.md3826 examples=['John Doe'],CODE
LOWdocs/cli-reference/field-customization.md3832 Example: 'John Doe'STRING
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/datamodel_code_generator/__init__.py1752Generate Python data models from schema definitions or structured data. This is the main entry point for code generSTRING
HIGHsrc/datamodel_code_generator/input_model.py983Load schema from a Python import path. Args: input_model: Import path in 'module.path:ObjectName' format STRING
HIGHsrc/datamodel_code_generator/parser/base.py1206Check if reference is in an ancestor package (__init__.py). When the reference's module path is an ancestor (prefixSTRING
Redundant / Tautological Comments8 hits · 13 pts
SeverityFileLineSnippetContext
LOWtests/parser/test_jsonschema.py4875 # Set raw_obj to None to trigger exception in _load_ref_schema_objectCOMMENT
LOWscripts/build_schema_docs.py8 python scripts/build_schema_docs.py --check # Check if docs are up to dateSTRING
LOWscripts/build_cli_docs.py421 # Check if this line starts a new admonitionCOMMENT
LOWscripts/build_cli_docs.py433 # Check if we're still in the admonition (indented content or empty line)COMMENT
LOW.github/workflows/release-draft.yaml316 # Check if draft release exists (use jq to extract first draft tag safely)COMMENT
LOWsrc/datamodel_code_generator/reference.py1139 # Check if it's a direct child (not nested)COMMENT
LOWsrc/datamodel_code_generator/reference.py1155 # Check if this is an external reference (different file)COMMENT
LOWsrc/datamodel_code_generator/parser/base.py3114 # Check if default list elements are hashable before converting typeCOMMENT
Self-Referential Comments3 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_main_kr.py4290 # Create a pyproject.toml with snake-case-field to demonstrate ignoringCOMMENT
MEDIUMtests/test_input_model.py1853 # Create a GenericAlias with origin=list but args=() - hits line 365COMMENT
MEDIUMtests/test_types.py435 # Create a shared DataType referenced by multiple parentsCOMMENT
Structural Annotation Overuse4 hits · 6 pts
SeverityFileLineSnippetContext
LOWdocs/development-contributing.md143### Step 1: Implement the option (Required)COMMENT
LOWdocs/development-contributing.md155### Step 2: Add a test with documentation marker (Required)COMMENT
LOWdocs/development-contributing.md180### Step 3: Categorize the option (Optional)COMMENT
LOWdocs/development-contributing.md194### Step 4: Generate and verify documentationCOMMENT
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/main/test_dynamic_models.py823 ("utils.py",): "def helper(): pass",CODE
LOWsrc/datamodel_code_generator/http.py94 def handle_request(self, request: _HTTPTransportRequest) -> _HTTPResponse: ...CODE
LOWsrc/datamodel_code_generator/http.py274 def handle_request(self, request: _HTTPCoreRequest) -> _HTTPCoreResponse: ...CODE
LOWsrc/datamodel_code_generator/http.py629 def handle_request(self, request: _HTTPTransportRequest) -> _HTTPResponse:CODE
AI Slop Vocabulary3 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/model/dataclass/test_param.py122 """Test dataclass generation with kw_only=True only (comprehensive test)."""STRING
MEDIUMtests/main/openapi/test_main_openapi.py8763 """Apply both JSON Schema conditional branches from the comprehensive fixture."""STRING
MEDIUMscripts/benchmark_builtin_templates.py72 """Return a robust median per-call duration in microseconds."""STRING
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/generate_changelog.sh3# Usage:COMMENT