Repository Analysis

pydantic/monty

A minimal, secure Python interpreter written in Rust for use by AI

9.4 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pydantic/monty, a Rust project with 8,120 GitHub stars. SynthScan v2.0 examined 240,592 lines of code across 1140 source files, recording 1964 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 9.4 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).

9.4
Adjusted Score
9.4
Raw Score
100%
Time Factor
2026-08-28
Last Push
8.1K
Stars
Rust
Language
240.6K
Lines of Code
1.1K
Files
2.0K
Pattern Hits
2026-08-29
Scan Date
0.02
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 0HIGH 20MEDIUM 218LOW 1726

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 1964 distinct pattern matches across 19 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.

Over-Commented Block949 hits · 904 pts
SeverityFileLineSnippetContext
LOWCargo.toml141tempfile = "3"COMMENT
LOW.macroscope/ignore.md1# Repository-wide Macroscope ignore (code review + any check-run agents).COMMENT
LOWcrates/monty-types/src/format.rs1//! Pure CPython-compatible formatting helpers shared by the boundary types:COMMENT
LOWcrates/monty-types/src/format.rs121 f.write_char(quote)COMMENT
LOWcrates/monty-types/src/format.rs141///COMMENT
LOWcrates/monty-types/src/resource.rs21COMMENT
LOWcrates/monty-types/src/resource.rs41/// Error returned when a resource limit is exceeded during execution.COMMENT
LOWcrates/monty-types/src/resource.rs81/// [`DEFAULT_MAX_RECURSION_DEPTH`]): unbounded recursion would let sandboxedCOMMENT
LOWcrates/monty-types/src/resource.rs141 pub fn max_recursion_depth(mut self, limit: usize) -> Self {COMMENT
LOWcrates/monty-types/src/resource.rs161#[derive(Debug, serde::Serialize, serde::Deserialize)]COMMENT
LOWcrates/monty-types/src/resource.rs241COMMENT
LOWcrates/monty-types/src/resource.rs321COMMENT
LOWcrates/monty-types/src/resource.rs381 ///COMMENT
LOWcrates/monty-types/src/os.rs21// =============================================================================COMMENT
LOWcrates/monty-types/src/os.rs41 IsFile(MontyPath),COMMENT
LOWcrates/monty-types/src/os.rs61 #[strum(serialize = "Path.resolve")]COMMENT
LOWcrates/monty-types/src/os.rs81 // ---- FS mutate (custom shapes) ----------------------------------------COMMENT
LOWcrates/monty-types/src/os.rs101 // ---- Non-FS -----------------------------------------------------------COMMENT
LOWcrates/monty-types/src/os.rs201 // `pathlib.Path.iterdir` reaches `os.scandir`, not `os.listdir`.COMMENT
LOWcrates/monty-types/src/os.rs401///COMMENT
LOWcrates/monty-types/src/os.rs421/// * `mode` - Directory permissions as octal. Common values:COMMENT
LOWcrates/monty-types/src/type_checking.rs1use std::str::FromStr;COMMENT
LOWcrates/monty-types/src/builtins.rs1//! [`BuiltinsFunctions`] — the name-level identity of every interpreter-nativeCOMMENT
LOWcrates/monty-types/src/builtins.rs41 // bytearray - handled by Type enumCOMMENT
LOWcrates/monty-types/src/builtins.rs101 Zip,COMMENT
LOWcrates/monty-types/src/io.rs21/// Today the `print()` builtin only writes to `Stdout`. The `Stderr` variant isCOMMENT
LOWcrates/monty-types/src/io.rs41/// - `Stdout` — writes to standard output (the default behavior).COMMENT
LOWcrates/monty-types/src/io.rs61 CollectString(&'a mut String, Option<usize>),COMMENT
LOWcrates/monty-types/src/io.rs221 /// # ArgumentsCOMMENT
LOWcrates/monty-types/src/object.rs21 format::{FormatFloat, StringRepr, bytes_repr_fmt, format_offset_timedelta_repr, string_repr_fmt},COMMENT
LOWcrates/monty-types/src/object.rs41/// # HashabilityCOMMENT
LOWcrates/monty-types/src/object.rs61 /// Python boolean (`True` or `False`).COMMENT
LOWcrates/monty-types/src/object.rs101 Time(MontyTime),COMMENT
LOWcrates/monty-types/src/object.rs121 Path(String),COMMENT
LOWcrates/monty-types/src/object.rs141 /// An external function provided by the host.COMMENT
LOWcrates/monty-types/src/object.rs761COMMENT
LOWcrates/monty-types/src/object.rs821 Dict,COMMENT
LOWcrates/monty-types/src/object.rs881 DictKeyIterator,COMMENT
LOWcrates/monty-types/src/object.rs901 ItertoolsIslice,COMMENT
LOWcrates/monty-types/src/object.rs941 // Every remaining variant is named by strum's `IntoStaticStr`COMMENT
LOWcrates/monty-types/src/object.rs981 pub year: i32,COMMENT
LOWcrates/monty-types/src/object.rs1001 pub timezone_name: Option<String>,COMMENT
LOWcrates/monty-types/src/object.rs1041/// Smallest UTC offset `datetime.timezone` accepts, -23:59:59.COMMENT
LOWcrates/monty-types/src/object.rs1341COMMENT
LOWcrates/monty-types/src/run_options.rs1//! Compile-time configuration: [`CompileOptions`] and theCOMMENT
LOWcrates/monty-types/src/file_mode.rs1//! [`FileMode`] — the parsed, validated form of a Python `open()` modeCOMMENT
LOWcrates/monty-types/src/file_mode.rs21/// currently rejects them — properly modelling them needs read-positionCOMMENT
LOWcrates/monty-types/src/exceptions.rs21 /// Optional exception message explaining what went wrongCOMMENT
LOWcrates/monty-types/src/exceptions.rs101 ///COMMENT
LOWcrates/monty-types/src/exceptions.rs181 ///COMMENT
LOWcrates/monty-types/src/exceptions.rs341 /// to a read-only mount, or attempting to access a path outside a mounted directory).COMMENT
LOWcrates/monty-types/src/exceptions.rs361 TypeError,COMMENT
LOWcrates/monty-types/src/exceptions.rs381 /// A `ValueError` subclass in CPython, so `except ValueError:` catches it.COMMENT
LOWcrates/monty-types/src/exceptions.rs441 // All other types only match exactly (handled by self == handler_type above)COMMENT
LOWcrates/monty-types/src/exceptions.rs481 }COMMENT
LOWcrates/monty-types/src/exceptions.rs561 ExcData::NoneCOMMENT
LOWcrates/monty-types/src/exceptions.rs581 /// UTF-8 (`json.loads` on `bytes` input).COMMENT
LOWcrates/monty-types/src/exceptions.rs621///COMMENT
LOWcrates/monty-types/src/exceptions.rs641 /// helper-function loops — share a single allocation. Without sharing, aCOMMENT
LOWcrates/monty-types/src/exceptions.rs741 /// already unreachable for any source ruff will accept (it caps sourceCOMMENT
889 more matches not shown…
Decorative Section Separators195 hits · 530 pts
SeverityFileLineSnippetContext
MEDIUMcrates/monty/test_cases/args__macro_errors.py23# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py25# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py222# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py224# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py321# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py323# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py379# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py381# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py414# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py416# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py498# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py500# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py529# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py531# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py581# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py583# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py703# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py705# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py750# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/args__macro_errors.py752# =====================================================================COMMENT
MEDIUMcrates/monty/test_cases/function__kwargs_unpacking.py71# ============================================================COMMENT
MEDIUMcrates/monty/test_cases/function__kwargs_unpacking.py73# ============================================================COMMENT
MEDIUMcrates/monty/test_cases/function__kwargs_unpacking.py126# ============================================================COMMENT
MEDIUMcrates/monty/test_cases/function__kwargs_unpacking.py128# ============================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py12# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py14# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py53# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py55# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py175# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py177# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py233# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py235# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py286# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py288# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py310# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py312# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py327# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py329# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py343# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py345# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py404# ============================================================================COMMENT
MEDIUMcrates/monty/test_cases/mount_fs__errors.py406# ============================================================================COMMENT
MEDIUM…ates/monty/test_cases/method__args_kwargs_unpacking.py126# ============================================================COMMENT
MEDIUM…ates/monty/test_cases/method__args_kwargs_unpacking.py128# ============================================================COMMENT
MEDIUM…ates/monty/test_cases/method__args_kwargs_unpacking.py223# ============================================================COMMENT
MEDIUM…ates/monty/test_cases/method__args_kwargs_unpacking.py225# ============================================================COMMENT
MEDIUMcrates/monty/test_cases/math__module.py1271# ==========================================================COMMENT
MEDIUMcrates/monty/test_cases/math__module.py1273# ==========================================================COMMENT
MEDIUMcrates/monty-python/tests/test_os_access_raw.py206# =============================================================================COMMENT
MEDIUMcrates/monty-python/tests/test_os_access_raw.py208# =============================================================================COMMENT
MEDIUMcrates/monty-python/tests/test_os_access_raw.py409# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py411# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py461# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py463# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py500# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py502# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py570# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access_raw.py572# =============================================================================STRING
MEDIUMcrates/monty-python/tests/test_os_access.py81# =============================================================================COMMENT
MEDIUMcrates/monty-python/tests/test_os_access.py83# =============================================================================COMMENT
135 more matches not shown…
Hyper-Verbose Identifiers639 hits · 514 pts
SeverityFileLineSnippetContext
LOWcrates/monty-js/ts/options.ts67export function encodeAssertMessageAnnotations(value: AssertMessageAnnotations | undefined): number | undefined {CODE
LOWcrates/monty/test_cases/closure__multi_hop_capture.py74def nonlocal_through_pass_through():CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py37def from_import_as_then_global():CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py53def nested_def_read_then_global():CODE
LOWcrates/monty/test_cases/async__control_flow.py36async def continue_swallows_awaited_error():CODE
LOWcrates/monty/test_cases/async__control_flow.py144async def return_swallows_pending_failure():CODE
LOWcrates/monty/test_cases/async__control_flow.py156async def continue_swallows_pending_failures():CODE
LOWcrates/monty/test_cases/import__local_scope.py41def test_aliased_import_local():CODE
LOWcrates/monty/test_cases/module__dunders.py18def module_name_from_function():CODE
LOWcrates/monty/test_cases/lookup__mutation.py186def inserted_candidate_lookup(kind, calls):CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py62def raise_in_finally_during_return():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py194def bare_raise_in_inner_finally():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py246def exceptional_handler_cell_cleanup():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py361def return_through_exploding_exit():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py473def continue_from_handler_through_finally():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py738def return_call_short_circuit():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py769def return_indirect_call_except():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py779def return_call_and_fallthrough():CODE
LOWcrates/monty/test_cases/try_finally__control_flow.py789def return_call_ternary_fallthrough():CODE
LOWcrates/monty/test_cases/dataclass__init.py114def non_default_after_default():CODE
LOWcrates/monty/test_cases/decorator__function.py414def walrus_captured_by_closure():CODE
LOWcrates/monty/test_cases/comprehension__scope.py48def make_comprehension_closure():CODE
LOWcrates/monty/test_cases/lambda__all.py138def test_inner_lambda_capture():CODE
LOWcrates/monty/test_cases/try_except__all.py151def finally_return_overrides_handler_exc():CODE
LOWcrates/monty/test_cases/try_except__all.py175def finally_return_overrides_else_exc():CODE
LOWcrates/monty/test_cases/try_except__all.py604def _return_from_except_then_bare_raise_in_finally() -> None:CODE
LOWcrates/monty/test_cases/try_except__all.py624def _return_from_doubly_nested_except() -> None:CODE
LOWcrates/monty/test_cases/try_except__all.py647def _returns_from_except_no_finally() -> str:CODE
LOWcrates/monty/test_cases/try_except__all.py714def _callee_raises_and_handles():CODE
LOWcrates/monty/test_cases/try_except__all.py739def _return_through_inner_finally() -> str:CODE
LOWcrates/monty/test_cases/try_except__all.py781def _return_through_two_finallys() -> str:CODE
LOWcrates/monty/test_cases/try_except__all.py849def _identity_through_finally():CODE
LOWcrates/monty/test_cases/decorator__class.py206def lambda_in_decorator_position():CODE
LOWcrates/monty/test_cases/decorator__class.py219def lambda_passed_to_decorator_factory():CODE
LOWcrates/monty/test_cases/decorator__class.py327def walrus_captured_by_closure():CODE
LOWcrates/monty/test_cases/list__ops.py498def _make_list_unpack_closure():CODE
LOWcrates/monty-python/tests/test_type_check.py162def test_type_check_default_allows_run_with_inputs(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py171def test_monty_typing_error_is_monty_error_subclass(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py180def test_monty_typing_error_caught_as_monty_error(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py186def test_monty_typing_error_repr(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py445def test_type_check_accumulated_function(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py519def test_type_check_function_define_then_call(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py661def test_type_check_stubs_and_accumulated_together(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py29def test_type_check_no_errors(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py34def test_type_check_with_errors(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py110def test_type_check_function_return_type(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py238def test_type_check_format_json(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py256def test_type_check_format_names_match_the_worker(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py275def test_type_check_format_invalid(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py284def test_type_check_format_not_a_string(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py300def test_type_check_stubs_with_external_function(pool: Monty):CODE
LOWcrates/monty-python/tests/test_type_check.py639def test_type_check_function_calling_prior_function(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py731def test_skip_type_check_does_not_accumulate(tc_session: MontySession):CODE
LOWcrates/monty-python/tests/test_type_check.py155def test_type_check_disabled_by_default(pool: Monty):STRING
LOWcrates/monty-python/tests/test_type_check.py439def test_type_check_accumulated(tc_session: MontySession):STRING
LOWcrates/monty-python/tests/test_type_check.py454def test_type_check_accumulated_catches_type_mismatch(tc_session: MontySession):STRING
LOWcrates/monty-python/tests/test_type_check.py511def test_type_check_multiple_snippets_sequence(tc_session: MontySession):STRING
LOWcrates/monty-python/tests/test_type_check.py528def test_type_check_function_define_then_call_wrong_type(tc_session: MontySession):STRING
LOWcrates/monty-python/tests/test_type_check.py652def test_type_check_variable_used_across_many_snippets(tc_session: MontySession):STRING
LOWcrates/monty-python/tests/test_type_check.py51def test_type_check_no_cross_session_state_leak():STRING
579 more matches not shown…
Unused Imports74 hits · 69 pts
SeverityFileLineSnippetContext
LOWcrates/monty/test_cases/import__star_error.py2CODE
LOWcrates/monty/test_cases/mount_fs__ops.py4CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py20CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py26CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py32CODE
LOW…ates/monty/test_cases/global__error_assigned_before.py38CODE
LOW…tes/monty/test_cases/import__error_module_not_found.py1CODE
LOWcrates/monty/test_cases/class__annotations.py8CODE
LOW…onty/test_cases/import__runtime_error_when_executed.py6CODE
LOW…tes/monty/test_cases/import__future_unknown_feature.py4CODE
LOWcrates/monty/test_cases/import__error_cannot_import.py1CODE
LOW…s/monty/test_cases/import__relative_no_module_error.py1CODE
LOWcrates/monty/test_cases/import__type_checking_guard.py7CODE
LOWcrates/monty/test_cases/import__type_checking_guard.py8CODE
LOWcrates/monty/test_cases/import__type_checking_guard.py17CODE
LOWcrates/monty/test_cases/import__type_checking_guard.py27CODE
LOWcrates/monty/test_cases/import__type_checking_guard.py35CODE
LOW…ates/monty/test_cases/import__relative_future_error.py4CODE
LOWcrates/monty/test_cases/import__relative_error.py1CODE
LOWcrates/monty-python/python/pydantic_monty/_cli.py12CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py1CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py8CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py37CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py37CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py37CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py37CODE
LOWcrates/monty-python/python/pydantic_monty/__init__.py37CODE
LOWcrates/monty-python/python/pydantic_monty/os_access.py1CODE
LOWcrates/monty-python/python/pydantic_monty/_binary.py10CODE
LOWcrates/monty-python/python/pydantic_monty/__main__.py3CODE
LOWcrates/monty-python/tests/test_type_check.py7CODE
LOWcrates/monty-python/tests/test_basic.py1CODE
LOWcrates/monty-python/tests/conftest.py3CODE
LOWcrates/monty-python/tests/test_inputs.py1CODE
LOWcrates/monty-python/tests/test_os_calls.py8CODE
LOWcrates/monty-python/tests/test_print.py3CODE
LOWcrates/monty-python/tests/test_threading.py4CODE
LOWcrates/monty-python/tests/test_async.py7CODE
LOWcrates/monty-python/tests/test_websocket.py11CODE
LOWcrates/monty-python/tests/test_install_dependencies.py8CODE
LOWcrates/monty-python/tests/test_exceptions.py3CODE
LOWcrates/monty-python/tests/test_repl.py3CODE
LOWcrates/monty-python/tests/test_feed_start.py3CODE
14 more matches not shown…
Docstring Block Structure8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHcrates/monty-python/python/pydantic_monty/os_access.py300Read the contents of a file as text. Args: path: The path to the file, either as a `PurePosixPath` STRING
HIGHcrates/monty-python/python/pydantic_monty/os_access.py320Read the contents of a file as bytes. Args: path: The path to the file, either as a `PurePosixPath`STRING
HIGHcrates/monty-python/python/pydantic_monty/os_access.py340Write text data to a file. Args: path: The path to the file, either as a `PurePosixPath` (from STRING
HIGHcrates/monty-python/python/pydantic_monty/os_access.py361Write binary data to a file. Args: path: The path to the file, either as a `PurePosixPath` (from STRING
HIGHcrates/monty-python/python/pydantic_monty/os_access.py440List the contents of a directory. Args: path: The path to the directory. Returns: STRING
HIGHcrates/monty-python/python/pydantic_monty/os_access.py456Get file status information. Use file_stat(), dir_stat(), or symlink_stat() helpers to create the return value.STRING
HIGHcrates/monty-python/tests/test_os_access_compat.py43Run Python code and return the result. The code can use Path('relative/path') and it will be resolved to the STRING
HIGHexamples/sql_playground/external_functions.py24Execute SQL query on a CSV file using DuckDB. Args: filepath: Path to the CSV file in the virtual fSTRING
Cross-Language Confusion (JS/TS)6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHcrates/monty-js/__test__/print.spec.ts91 print("Count", i)CODE
HIGHcrates/monty-js/__test__/print.spec.ts128 print(f"Hello, {name}!")CODE
HIGHcrates/monty-js/__test__/print.spec.ts142 print("Inside inner function")CODE
HIGHcrates/monty-js/__test__/print.spec.ts156 print(f"Count: {i}")CODE
HIGHcrates/monty-js/__test__/print.spec.ts170print("hello")CODE
HIGHcrates/monty-js/__test__/print.spec.ts171print(func())CODE
Excessive Try-Catch Wrapping18 hits · 26 pts
SeverityFileLineSnippetContext
LOWcrates/monty/test_cases/try_except__all.py104except Exception:CODE
LOWcrates/monty/test_cases/try_except__all.py443 except Exception:CODE
LOWcrates/monty/test_cases/try_except__all.py454 except Exception:CODE
LOWcrates/monty/test_cases/try_except__all.py464except Exception:CODE
MEDIUMcrates/monty/test_cases/try_except__all.py118def try_return_finally():CODE
LOWcrates/monty-python/exercise.py43 except Exception as e:CODE
LOWcrates/monty-python/tests/test_async.py526except Exception as e:STRING
LOWcrates/monty-python/tests/test_re.py88except Exception as e:CODE
LOWscripts/complete_tests.py61 except Exception as e:CODE
LOWscripts/bench_json.py89 except Exception as e:STRING
MEDIUMscripts/run_traceback.py192 print(f'Error: File not found: {file_path}', file=sys.stderr)CODE
MEDIUMscripts/codecov_diff.py201 print(f'Error: {repository.get("message", "Repository not found")}', file=sys.stderr)CODE
MEDIUMscripts/codecov_diff.py206 print('Error: Pull request not found', file=sys.stderr)CODE
MEDIUMscripts/codecov_diff.py310 print(f'Error: Could not fetch coverage for {org}/{repo} PR #{pr_number}')CODE
MEDIUMscripts/codecov_diff.py398 print('Error: Could not detect repository. Use --org and --repo.', file=sys.stderr)CODE
MEDIUMscripts/codecov_diff.py405 print('Error: Could not detect PR number. Provide PR number as argument.', file=sys.stderr)CODE
LOWscripts/run_nasty_code.py74 except Exception as exc:CODE
MEDIUMscripts/check_imports.py109 print('Error: Found local `use` statements inside function bodies:', file=sys.stderr)CODE
AI Slop Vocabulary9 hits · 26 pts
SeverityFileLineSnippetContext
MEDIUMcrates/monty/test_cases/class__name_error.py6# line, which Monty does not implement; the traceback harness strips thatCOMMENT
MEDIUM…ates/monty/test_cases/global__error_assigned_before.py9# the harness verifies through the `# Raise=` comment.COMMENT
MEDIUMcrates/monty/test_cases/async__control_flow.py8# round-trip at every suspension in the test harness).COMMENT
MEDIUMcrates/monty/test_cases/async__ext_call.py91# CPython the test harness now returns an already-resolved `asyncio.Future`,COMMENT
MEDIUMcrates/monty/test_cases/async__with_args.py35 # `__qualname__` (here the harness's wrapping function), which MontyCOMMENT
MEDIUMcrates/monty/tests/resource_limits.rs569/// generous budget keeps the timing assertion robust on loaded CI.COMMENT
MEDIUMcrates/monty/src/value.rs2421/// Wraps a `StaticStrings` variant to leverage its string conversion capabilities.COMMENT
LOWscripts/test_fixtures.py307 # For virtual paths, just return as-is (already absolute)COMMENT
MEDIUM.github/workflows/ci.yml150 # not depend on `monty` at all), the subprocess stack and the docs harness.COMMENT
Cross-Language Confusion3 hits · 21 pts
SeverityFileLineSnippetContext
HIGHcrates/monty/test_cases/json__module.py11assert json.loads('{"a": 1, "b": [true, null]}') == {CODE
HIGHcrates/monty/test_cases/json__module.py17assert json.loads(b'{"a":[1,true,null]}') == {'a': [1, True, None]}CODE
HIGHcrates/monty-python/tests/test_feed_start.py469 # no entry for `missing` in the (empty) lookup — the name stays undefined,COMMENT
Self-Referential Comments7 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMcrates/monty/test_cases/args__macro_errors.py3# This file is the source of truth for every error path the macro (andCOMMENT
MEDIUMcrates/monty/test_cases/collections__deque.py4# This file is dual-run against CPython and Monty, so both must agree exactly.COMMENT
MEDIUMcrates/monty-type-checking/tests/bad_types.py1# This file contains intentional type errors to test the type checker.COMMENT
MEDIUMcrates/monty-python/tests/test_type_check.py668 # Define a helper that references the stub function — type checking passesSTRING
MEDIUMcrates/monty-python/tests/test_os_access_compat.py167 # Create a mock os module with our environCOMMENT
MEDIUMcrates/monty-typeshed/update.py273 # Create a new If node with filtered contentsSTRING
MEDIUMexamples/web_scraper/example_code.py42 # Create a dictionary for this modelCOMMENT
Verbosity Indicators10 hits · 16 pts
SeverityFileLineSnippetContext
LOWcrates/monty-fs/tests/fs_security.rs1900 // Step 1: Rename the symlink within the mount.COMMENT
LOWcrates/monty-python/tests/test_async.py868 # Step 1: LLM explores what's availableCOMMENT
LOWcrates/monty-python/tests/test_async.py872 # Step 2: LLM filters by categoryCOMMENT
LOWcrates/monty-python/tests/test_async.py878 # Step 3: LLM computes statsCOMMENT
LOWcrates/monty-python/tests/test_async.py889 # Step 4: LLM also checks electronicsCOMMENT
LOWcrates/monty-python/tests/test_async.py895 # Step 5: LLM builds final summary from accumulated stateCOMMENT
LOWexamples/sql_playground/sandbox_code.py15 # Step 1: Query top 10 customers by total purchasesCOMMENT
LOWexamples/sql_playground/sandbox_code.py27 # Step 2: Get their Twitter handles from the survey dataSTRING
LOWexamples/sql_playground/sandbox_code.py41 # Step 3: Load all tweetsSTRING
LOWexamples/sql_playground/sandbox_code.py47 # Step 4: For each customer, find their tweets and analyze sentimentSTRING
Structural Annotation Overuse10 hits · 16 pts
SeverityFileLineSnippetContext
LOWcrates/monty-fs/tests/fs_security.rs1900 // Step 1: Rename the symlink within the mount.COMMENT
LOWcrates/monty-python/tests/test_async.py868 # Step 1: LLM explores what's availableCOMMENT
LOWcrates/monty-python/tests/test_async.py872 # Step 2: LLM filters by categoryCOMMENT
LOWcrates/monty-python/tests/test_async.py878 # Step 3: LLM computes statsCOMMENT
LOWcrates/monty-python/tests/test_async.py889 # Step 4: LLM also checks electronicsCOMMENT
LOWcrates/monty-python/tests/test_async.py895 # Step 5: LLM builds final summary from accumulated stateCOMMENT
LOWexamples/sql_playground/sandbox_code.py15 # Step 1: Query top 10 customers by total purchasesCOMMENT
LOWexamples/sql_playground/sandbox_code.py27 # Step 2: Get their Twitter handles from the survey dataSTRING
LOWexamples/sql_playground/sandbox_code.py41 # Step 3: Load all tweetsSTRING
LOWexamples/sql_playground/sandbox_code.py47 # Step 4: For each customer, find their tweets and analyze sentimentSTRING
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHcrates/monty-python/tests/test_external_async.py0try: get_str() result = 'no error' except valueerror: result = 'caught' resultSTRING
HIGHcrates/monty-python/tests/test_async.py0try: get_str() result = 'no error' except valueerror: result = 'caught' resultSTRING
HIGHcrates/monty-python/tests/test_external.py0try: get_str() result = 'no error' except valueerror: result = 'caught' resultSTRING
Deep Nesting13 hits · 13 pts
SeverityFileLineSnippetContext
LOW…s/monty/test_cases/loop__break_nested_except_clears.py21CODE
LOW…onty/test_cases/loop__continue_nested_except_clears.py23CODE
LOWcrates/monty/test_cases/try_except__all.py781CODE
LOWcrates/monty-python/exercise.py20CODE
LOWcrates/monty-python/python/pydantic_monty/os_access.py855CODE
LOWcrates/monty-python/python/pydantic_monty/os_access.py972CODE
LOWcrates/monty-typeshed/update.py221CODE
LOWscripts/complete_tests.py19CODE
LOWscripts/bench_json.py68CODE
LOWscripts/run_traceback.py22CODE
LOWscripts/codecov_diff.py236CODE
LOWscripts/codecov_diff.py304CODE
LOWscripts/check_imports.py123CODE
Redundant / Tautological Comments10 hits · 13 pts
SeverityFileLineSnippetContext
LOWcrates/monty/src/builtins/hasattr.rs26/// hasattr(obj, 'x') # Check if obj.x existsCOMMENT
LOWcrates/monty-python/example.py28 # Print output is forwarded to Python stdoutCOMMENT
LOWcrates/monty-python/tests/test_os_access_raw.py105 # Check if directory is emptyCOMMENT
LOWcrates/monty-typeshed/update.py186 # Check if already at the right commitSTRING
LOWexamples/web_scraper/example_code.py53# Print the resultsCOMMENT
LOWexamples/expense_analysis/main.py61 # Check if they exceeded standard budgetSTRING
LOWexamples/expense_analysis/main.py71 # Check if they exceeded their actual budget (standard or custom)STRING
LOWexamples/sql_playground/main.py23# Read file contentsCOMMENT
LOWscripts/test_fixtures.py353 # Check if parent existsCOMMENT
LOWscripts/test_fixtures.py475# Check if already patched (happens when module is re-executed in same interpreter)COMMENT
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…tes/monty/test_cases/refcount__gather_nested_cancel.py15CODE
LOWcrates/monty-python/tests/conftest.py23CODE
LOWcrates/monty-python/tests/conftest.py60CODE
Modern Structural Boilerplate4 hits · 2 pts
SeverityFileLineSnippetContext
LOWcrates/monty-python/python/pydantic_monty/os_access.py1128 def _update_paths_recursive(self, tree: Tree, old_prefix: PurePosixPath, new_prefix: PurePosixPath) -> None:CODE
LOWcrates/monty-python/tests/test_os_access_compat.py69 def set_environ(self, environ: dict[str, str]) -> None:CODE
LOWcrates/monty-python/tests/test_os_access_compat.py92 def set_environ(self, environ: dict[str, str]) -> None:CODE
LOWcrates/monty-python/tests/test_os_access_compat.py147 def set_environ(self, environ: dict[str, str]) -> None:CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWcrates/monty/test_cases/async__ext_call.py96async def helper(future):CODE
LOWcrates/monty/test_cases/decorator__function.py314 def helper():CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWpyproject.toml54# make sure to use relative durations:COMMENT