Repository Analysis

python/mypy

Optional static typing for Python

13.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of python/mypy, a Python project with 20,529 GitHub stars. SynthScan v2.0 examined 241,764 lines of code across 642 source files, recording 3199 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 13.3 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).

13.3
Adjusted Score
13.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
20.5K
Stars
Python
Language
241.8K
Lines of Code
642
Files
3.2K
Pattern Hits
2026-07-14
Scan Date
0.07
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 2HIGH 45MEDIUM 63LOW 3089

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 3199 distinct pattern matches across 20 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 Identifiers1222 hits · 1064 pts
SeverityFileLineSnippetContext
LOWsetup.py30def is_list_of_setuptools_extension(items: list[Any]) -> TypeGuard[list[Extension]]:CODE
LOWmisc/incremental_checker.py86def ensure_environment_is_ready(mypy_path: str, temp_repo_path: str, mypy_cache_path: str) -> None:CODE
LOWmisc/generate_changelog.py12def find_all_release_branches() -> list[tuple[int, int]]:CODE
LOWmisc/generate_changelog.py108def filter_out_commits_from_old_release_branch(CODE
LOWmisc/generate_changelog.py126def find_changes_between_releases(old_branch: str, new_branch: str) -> list[CommitInfo]:CODE
LOWmisc/upload-pypi.py56def download_all_release_assets(release: dict[str, Any], dst: Path) -> None:CODE
LOWmisc/sync-typeshed.py90def create_or_update_pull_request(*, title: str, body: str, branch_name: str) -> None:CODE
LOWmypyc/build.py260def generate_c_extension_shim(CODE
LOWmypyc/build.py470def _patch_setuptools_copy_extensions_to_source() -> None:CODE
LOWmypyc/annotate.py275 def visit_dictionary_comprehension(self, o: DictionaryComprehension, /) -> None:CODE
LOWmypyc/namegen.py104def make_module_translation_map(names: list[str]) -> dict[str, str]:CODE
LOWmypyc/irbuild/vec.py282def vec_check_and_adjust_index(CODE
LOWmypyc/irbuild/vec.py345def vec_get_item_unsafe_lower(CODE
LOWmypyc/irbuild/ll_builder.py572 def coerce_int_to_fixed_width(self, src: Value, target_type: RType, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py667 def coerce_tagged_to_fixed_width_with_range_check(CODE
LOWmypyc/irbuild/ll_builder.py718 def emit_fixed_width_overflow_error(self, target_type: RType, line: int) -> None:CODE
LOWmypyc/irbuild/ll_builder.py730 def coerce_short_int_to_fixed_width(self, src: Value, target_type: RType, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py757 def coerce_fixed_width_to_int(self, src: Value, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py1374 def native_args_to_positional(CODE
LOWmypyc/irbuild/ll_builder.py1917 def translate_instance_contains(self, inst: Value, item: Value, op: str, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py1940 def _non_specialized_unary_op(self, value: Value, op: str, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py2702 def inline_fixed_width_divide(self, type: RType, lhs: Value, rhs: Value, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py2836 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/ll_builder.py2906 def translate_special_method_call(CODE
LOWmypyc/irbuild/ll_builder.py2934 def _translate_special_low_level_method_call(CODE
LOWmypyc/irbuild/ll_builder.py3016 def _translate_fast_optional_eq_cmp(CODE
LOWmypyc/irbuild/util.py240def get_explicit_native_class(path: str, cdef: ClassDef, errors: Errors) -> bool | None:CODE
LOWmypyc/irbuild/util.py271def is_implicit_extension_class(cdef: ClassDef) -> tuple[bool, str]:CODE
LOWmypyc/irbuild/mapper.py243 def is_native_module_ref_expr(self, expr: RefExpr) -> bool:CODE
LOWmypyc/irbuild/prebuildvisitor.py36def _comprehension_has_lambda(node: GeneratorExpr | DictionaryComprehension) -> bool:CODE
LOWmypyc/irbuild/prebuildvisitor.py200 def _visit_comprehension_with_scope(self, o: GeneratorExpr | DictionaryComprehension) -> None:CODE
LOWmypyc/irbuild/prebuildvisitor.py243 def visit_dictionary_comprehension(self, o: DictionaryComprehension) -> None:CODE
LOWmypyc/irbuild/env_class.py277def setup_func_for_recursive_call(CODE
LOWmypyc/irbuild/format_str_tokenizer.py135def convert_format_expr_to_str(CODE
LOWmypyc/irbuild/format_str_tokenizer.py211def convert_format_expr_to_bytes(CODE
LOWmypyc/irbuild/statement.py166def transform_expression_stmt(builder: IRBuilder, stmt: ExpressionStmt) -> None:CODE
LOWmypyc/irbuild/statement.py192def check_unsupported_cls_assignment(builder: IRBuilder, stmt: AssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py224def transform_assignment_stmt(builder: IRBuilder, stmt: AssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py300def transform_operator_assignment_stmt(builder: IRBuilder, stmt: OperatorAssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py325def import_globals_id_and_name(module_id: str, as_name: str | None) -> tuple[str, str]:CODE
LOWmypyc/irbuild/statement.py386def split_import_group_to_python_and_native(CODE
LOWmypyc/irbuild/statement.py413def transform_imports_without_grouping(CODE
LOWmypyc/irbuild/statement.py429def transform_non_native_import_group(CODE
LOWmypyc/irbuild/statement.py540def transform_import_from_buckets(CODE
LOWmypyc/irbuild/statement.py769def transform_try_except_stmt(builder: IRBuilder, t: TryStmt) -> None:CODE
LOWmypyc/irbuild/statement.py857def try_finally_resolve_control(CODE
LOWmypyc/irbuild/statement.py907def transform_try_finally_stmt(CODE
LOWmypyc/irbuild/statement.py944def transform_try_finally_stmt_async(CODE
LOWmypyc/irbuild/statement.py1468def transform_yield_from_expr(builder: IRBuilder, o: YieldFromExpr) -> Value:CODE
LOWmypyc/irbuild/statement.py1480def transform_type_alias_stmt(builder: IRBuilder, s: TypeAliasStmt) -> None:CODE
LOWmypyc/irbuild/constant_fold.py80def constant_fold_binary_op_extended(CODE
LOWmypyc/irbuild/ast_helpers.py56def maybe_process_conditional_comparison(CODE
LOWmypyc/irbuild/builder.py400 def load_bytes_from_str_literal(self, value: str, line: int = -1) -> Value:CODE
LOWmypyc/irbuild/builder.py505 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/builder.py633 def maybe_add_implicit_return(self) -> None:CODE
LOWmypyc/irbuild/builder.py651 def disallow_class_assignments(self, lvalues: list[Lvalue], line: int) -> None:CODE
LOWmypyc/irbuild/builder.py921 def process_sequence_assignment(CODE
LOWmypyc/irbuild/builder.py954 def process_iterator_tuple_assignment_helper(CODE
LOWmypyc/irbuild/builder.py969 def process_iterator_tuple_assignment(CODE
LOWmypyc/irbuild/builder.py1100 def get_sequence_type_from_type(self, target_type: Type) -> RType:CODE
1162 more matches not shown…
Deep Nesting651 hits · 510 pts
SeverityFileLineSnippetContext
LOWmisc/apply-cache-diff.py34CODE
LOWmisc/diff-cache.py154CODE
LOWmisc/gen_blog_post_html.py40CODE
LOWmypyc/build.py632CODE
LOWmypyc/build.py691CODE
LOWmypyc/build.py785CODE
LOWmypyc/build.py875CODE
LOWmypyc/subtype.py27CODE
LOWmypyc/subtype.py65CODE
LOWmypyc/annotate.py182CODE
LOWmypyc/annotate.py299CODE
LOWmypyc/annotate.py315CODE
LOWmypyc/annotate.py359CODE
LOWmypyc/rt_expandtype.py15CODE
LOWmypyc/build_setup.py35CODE
LOWmypyc/sametype.py57CODE
LOWmypyc/irbuild/vec.py210CODE
LOWmypyc/irbuild/ll_builder.py465CODE
LOWmypyc/irbuild/ll_builder.py969CODE
LOWmypyc/irbuild/ll_builder.py1374CODE
LOWmypyc/irbuild/ll_builder.py1639CODE
LOWmypyc/irbuild/ll_builder.py2023CODE
LOWmypyc/irbuild/ll_builder.py2063CODE
LOWmypyc/irbuild/ll_builder.py2206CODE
LOWmypyc/irbuild/ll_builder.py2378CODE
LOWmypyc/irbuild/ll_builder.py2496CODE
LOWmypyc/irbuild/ll_builder.py2634CODE
LOWmypyc/irbuild/ll_builder.py2752CODE
LOWmypyc/irbuild/util.py72CODE
LOWmypyc/irbuild/util.py154CODE
LOWmypyc/irbuild/util.py182CODE
LOWmypyc/irbuild/util.py240CODE
LOWmypyc/irbuild/mapper.py73CODE
LOWmypyc/irbuild/prebuildvisitor.py148CODE
LOWmypyc/irbuild/env_class.py236CODE
LOWmypyc/irbuild/format_str_tokenizer.py48CODE
LOWmypyc/irbuild/format_str_tokenizer.py135CODE
LOWmypyc/irbuild/format_str_tokenizer.py211CODE
LOWmypyc/irbuild/statement.py540CODE
LOWmypyc/irbuild/statement.py1267CODE
LOWmypyc/irbuild/constant_fold.py39CODE
LOWmypyc/irbuild/builder.py1728CODE
LOWmypyc/irbuild/builder.py724CODE
LOWmypyc/irbuild/builder.py746CODE
LOWmypyc/irbuild/builder.py864CODE
LOWmypyc/irbuild/builder.py1100CODE
LOWmypyc/irbuild/builder.py1346CODE
LOWmypyc/irbuild/classdef.py89CODE
LOWmypyc/irbuild/classdef.py564CODE
LOWmypyc/irbuild/specialize.py720CODE
LOWmypyc/irbuild/specialize.py809CODE
LOWmypyc/irbuild/specialize.py872CODE
LOWmypyc/irbuild/specialize.py940CODE
LOWmypyc/irbuild/specialize.py992CODE
LOWmypyc/irbuild/specialize.py1053CODE
LOWmypyc/irbuild/specialize.py1073CODE
LOWmypyc/irbuild/specialize.py1097CODE
LOWmypyc/irbuild/specialize.py1307CODE
LOWmypyc/irbuild/main.py58CODE
LOWmypyc/irbuild/for_helpers.py481CODE
591 more matches not shown…
Over-Commented Block554 hits · 496 pts
SeverityFileLineSnippetContext
LOWtest-requirements.txt1#COMMENT
LOWtest-requirements.txt21 # -r test-requirements.inCOMMENT
LOWtest-requirements.txt41 # viaCOMMENT
LOWmisc/find_type.py1#!/usr/bin/env python3COMMENT
LOWmisc/docker/run.sh1#!/bin/bashCOMMENT
LOWmypyc/options.py41 # even when its return type is just `bool`.COMMENT
LOWmypyc/options.py61 # experimental mode (e.g. use _experimental suffix in librt run test).COMMENT
LOWmypyc/common.py61MAX_LITERAL_SHORT_INT: Final = MAX_SHORT_INTCOMMENT
LOWmypyc/irbuild/statement.py341 return globals_id, globals_nameCOMMENT
LOWmypyc/irbuild/statement.py981 builder.activate_block(err_handler)COMMENT
LOWmypyc/irbuild/callable_class.py221 # - A nested function: the callable class is instantiatedCOMMENT
LOWmypyc/irbuild/specialize.py161# function. Specializers can return None to indicate that they failedCOMMENT
LOWmypyc/irbuild/function.py921 # typ.fullname contains the module where the class object was defined. However, it is possibleCOMMENT
LOWmypyc/lib-rt/dict_ops.c1// Dict primitive operationsCOMMENT
LOWmypyc/lib-rt/misc_ops.c1#include "pythoncapi_compat.h"COMMENT
LOWmypyc/lib-rt/misc_ops.c1281 Py_DECREF(file);COMMENT
LOWmypyc/lib-rt/CPy.h1// Mypyc C APICOMMENT
LOWmypyc/lib-rt/CPy.h21COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h1// Header file providing new C API functions to old Python versions.COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h21#include <Python.h>COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h41# elseCOMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h101COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h121# define Py_IsTrue(x) Py_Is(x, Py_True)COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h541 return Py_NewRef(code->co_cellvars);COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h1201COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h1221COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h1921 Py_DECREF(obj);COMMENT
LOWmypyc/lib-rt/pythoncapi_compat.h1941# define Py_T_USHORT 10COMMENT
LOWmypyc/lib-rt/pythonsupport.c1// Collects code that was copied in from cpython, for a couple of different reasons:COMMENT
LOWmypyc/lib-rt/str_extra_ops.c1#include "str_extra_ops.h"COMMENT
LOWmypyc/lib-rt/stringwriter_extra_ops.c1// Primitives related to librt.strings.StringWriter that get linked staticallyCOMMENT
LOWmypyc/lib-rt/str_ops.c1#include "pythoncapi_compat.h"COMMENT
LOWmypyc/lib-rt/getargs.c21 * programmatically and can be assumed valid.COMMENT
LOWmypyc/lib-rt/getargs.c41#elseCOMMENT
LOWmypyc/lib-rt/vecs_extra_ops.c1// Primitives related to librt.vecs that get linked staticallyCOMMENT
LOWmypyc/lib-rt/generic_ops.c1// Generic primitive operationsCOMMENT
LOWmypyc/lib-rt/bytearray_extra_ops.h1#ifndef MYPYC_BYTEARRAY_EXTRA_OPS_HCOMMENT
LOWmypyc/lib-rt/pythonsupport.h1// Collects code that was copied in from cpython, for a couple of different reasons:COMMENT
LOWmypyc/lib-rt/pythonsupport.h21#include "internal/pycore_genobject.h" // _PyGen_FetchStopIterationValueCOMMENT
LOWmypyc/lib-rt/pythonsupport.h41#ifdef Py_GIL_DISABLEDCOMMENT
LOWmypyc/lib-rt/pythonsupport.h81// _Py_NewRefWithLock fallback are unnecessary here -- a plain load + Py_INCREF isCOMMENT
LOWmypyc/lib-rt/pythonsupport.h101// reference after this store. The old value must therefore stay alive until everyCOMMENT
LOWmypyc/lib-rt/pythonsupport.h121 _PyObject_XDecRefDelayed(op);COMMENT
LOWmypyc/lib-rt/pythonsupport.h141// (it would let that first cross-thread reader succeed on the cheaperCOMMENT
LOWmypyc/lib-rt/int_ops.c1// Int primitive operations (tagged arbitrary-precision integers)COMMENT
LOWmypyc/lib-rt/int_ops.c21COMMENT
LOWmypyc/lib-rt/getargsfast.c21// The kwtuple field doubles as the "parser has been initialized" flag: it isCOMMENT
LOWmypyc/lib-rt/exc_ops.c201// to the internal C API: to the pycore_frame.h header file.COMMENT
LOWmypyc/lib-rt/mypyc_util.h1#ifndef MYPYC_UTIL_HCOMMENT
LOWmypyc/lib-rt/mypyc_util.h21#define CPy_NOINLINE __declspec(noinline)COMMENT
LOWmypyc/lib-rt/mypyc_util.h41// 3. GNU thread local storage for GCC/Clang targets that still need itCOMMENT
LOWmypyc/lib-rt/mypyc_util.h61 #define CPY_UNROLL_LOOP(n)COMMENT
LOWmypyc/lib-rt/mypyc_util.h101COMMENT
LOWmypyc/lib-rt/mypyc_util.h161}COMMENT
LOWmypyc/lib-rt/mypyc_util.h181#define CPY_LONG_IS_NEGATIVE(o) (((o)->long_value.lv_tag & CPY_SIGN_MASK) == CPY_SIGN_NEGATIVE)COMMENT
LOWmypyc/lib-rt/mypyc_util.h201// Are we targeting Python 3.14 or newer?COMMENT
LOWmypyc/lib-rt/strings/librt_strings.c1#include "pythoncapi_compat.h"COMMENT
LOWmypyc/lib-rt/strings/librt_strings_common.h1#ifndef LIBRT_STRINGS_COMMON_HCOMMENT
LOWmypyc/lib-rt/strings/librt_strings.h1#ifndef LIBRT_STRINGS_HCOMMENT
LOWmypyc/lib-rt/strings/librt_strings_api.h1#ifndef LIBRT_STRINGS_API_HCOMMENT
494 more matches not shown…
Unused Imports375 hits · 366 pts
SeverityFileLineSnippetContext
LOWconftest.py1CODE
LOWsetup.py3CODE
LOWruntests.py3CODE
LOWmisc/cherry-pick-typeshed.py8CODE
LOWmisc/profile_check.py28CODE
LOWmisc/incremental_checker.py34CODE
LOWmisc/dump-ast.py6CODE
LOWmisc/generate_changelog.py3CODE
LOWmisc/apply-cache-diff.py10CODE
LOWmisc/analyze_cache.py3CODE
LOWmisc/upload-pypi.py8CODE
LOWmisc/convert-cache.py8CODE
LOWmisc/sync-typeshed.py10CODE
LOWmisc/perf_compare.py20CODE
LOWmisc/log_trace_check.py10CODE
LOWmisc/perf_checker.py3CODE
LOWmisc/diff-cache.py8CODE
LOWmisc/find_type.py26CODE
LOWmypyc/build.py21CODE
LOWmypyc/build.py31CODE
LOWmypyc/subtype.py3CODE
LOWmypyc/options.py1CODE
LOWmypyc/crash.py1CODE
LOWmypyc/common.py1CODE
LOWmypyc/build_setup.py11CODE
LOWmypyc/errors.py1CODE
LOWmypyc/sametype.py3CODE
LOWmypyc/namegen.py1CODE
LOWmypyc/rt_subtype.py16CODE
LOWmypyc/__main__.py13CODE
LOWmypyc/irbuild/vec.py3CODE
LOWmypyc/irbuild/targets.py1CODE
LOWmypyc/irbuild/ll_builder.py7CODE
LOWmypyc/irbuild/util.py3CODE
LOWmypyc/irbuild/vtable.py3CODE
LOWmypyc/irbuild/mapper.py3CODE
LOWmypyc/irbuild/prebuildvisitor.py1CODE
LOWmypyc/irbuild/env_class.py18CODE
LOWmypyc/irbuild/format_str_tokenizer.py3CODE
LOWmypyc/irbuild/statement.py9CODE
LOWmypyc/irbuild/constant_fold.py11CODE
LOWmypyc/irbuild/ast_helpers.py7CODE
LOWmypyc/irbuild/builder.py6CODE
LOWmypyc/irbuild/classdef.py3CODE
LOWmypyc/irbuild/generator.py11CODE
LOWmypyc/irbuild/missingtypevisitor.py1CODE
LOWmypyc/irbuild/visitor.py6CODE
LOWmypyc/irbuild/context.py3CODE
LOWmypyc/irbuild/nonlocalcontrol.py6CODE
LOWmypyc/irbuild/callable_class.py7CODE
LOWmypyc/irbuild/specialize.py15CODE
LOWmypyc/irbuild/main.py23CODE
LOWmypyc/irbuild/for_helpers.py8CODE
LOWmypyc/irbuild/expression.py7CODE
LOWmypyc/irbuild/prepare.py14CODE
LOWmypyc/irbuild/function.py13CODE
LOWmypyc/irbuild/match.py1CODE
LOWmypyc/lib-rt/setup.py6CODE
LOWmypyc/lib-rt/setup.py17CODE
LOWmypyc/lib-rt/build_setup.py11CODE
315 more matches not shown…
Cross-Language Confusion39 hits · 225 pts
SeverityFileLineSnippetContext
HIGHmypyc/irbuild/ll_builder.py1850 ComparisonOp(check_error_result, null, ComparisonOp.NEQ, line)CODE
HIGHmypyc/irbuild/ll_builder.py991 null, don't put it in the dict.STRING
HIGHmypyc/irbuild/function.py412 ComparisonOp(generic_getattr_result, null, ComparisonOp.NEQ, line)CODE
HIGHmypyc/irbuild/function.py455 is_delattr = builder.add(ComparisonOp(value_arg, null, ComparisonOp.EQ, line))CODE
HIGHmypyc/irbuild/function.py470 builder.call_c(generic_setattr, [builder.self(), attr_arg, null], line)CODE
HIGHmypyc/analysis/attrdefined.py209 # If an attribute we *read* may be undefined, it isn't always defined.COMMENT
HIGHmypyc/ir/rtypes.py83 # undefined, we can't just rely on the error value to signal this.COMMENT
HIGHmypyc/codegen/emitmodule.py1562 return f"{emitter.ctype_spaced(typ)}{static_name} = {undefined};"CODE
HIGHmypyc/codegen/emitfunc.py412 atomically and returns a new reference (or NULL if undefined), so callers mustSTRING
HIGHmypyc/codegen/emitfunc.py524 # undefined, which is precisely the error value here, so the "NULL withoutCOMMENT
HIGHmypyc/codegen/emitfunc.py596 # previously undefined), so decref the old value.COMMENT
HIGHmypyc/codegen/emit.py1090 self.emit_lines(f"if ({dest} == -1.0 && PyErr_Occurred()) {{", failure, "}")CODE
HIGHmypyc/transform/spill.py100 block.ops.extend([null, SetAttr(env_reg, spill_locs[op.src], null, op.line)])CODE
HIGHmypyc/transform/refcount.py197 # null).COMMENT
HIGHmypy/meet.py771 n = r.length() if isinstance(r, TupleType) else 1CODE
HIGHmypy/meet.py1018 if s.length() == t.length():CODE
HIGHmypy/meet.py1020 for i in range(t.length()):CODE
HIGHmypy/meet.py1031 if s.length() == t.length() and s_unpack_index == t_unpack_index:CODE
HIGHmypy/meet.py1067 if fixed.length() < variadic.length() - 1:CODE
HIGHmypy/meet.py1070 suffix_len = variadic.length() - prefix_len - 1CODE
HIGHmypy/types.py2849 return self.length() > 0CODE
HIGHmypy/types.py2856 if self.length() == 0:CODE
HIGHmypy/types.py2858 if self.length() > 1:CODE
HIGHmypy/join.py481 if s.length() == t.length():CODE
HIGHmypy/join.py483 for i in range(t.length()):CODE
HIGHmypy/join.py495 if s.length() == t.length() and s_unpack_index == t_unpack_index:CODE
HIGHmypy/join.py500 suffix_len = t.length() - t_unpack_index - 1CODE
HIGHmypy/join.py527 if s.length() == 1 or t.length() == 1:CODE
HIGHmypy/join.py559 if fixed.length() < variadic.length() - 1:CODE
HIGHmypy/join.py563 suffix_len = variadic.length() - prefix_len - 1CODE
HIGHmypy/partially_defined.py272 """If name has previously been reported as undefined, the NameExpr that was called will be returned."""STRING
HIGHmypy/checkexpr.py4648 return left.length()CODE
HIGHmypy/checkexpr.py4652 return left.length() - 1 + unpack.type.min_lenCODE
HIGHmypy/checkexpr.py4653 return left.length() - 1CODE
HIGHmypy/checkexpr.py4679 extra_items = self.min_tuple_length(left) - left.length() + 1CODE
HIGHmypy/checker.py7592 if method(typ.length(), size):CODE
HIGHmypy/checker.py7602 min_len = typ.length() - 1 + unpacked.min_lenCODE
HIGHmypy/checker.py7614 unpack = UnpackType(unpacked.copy_modified(min_len=size - typ.length() + 1))CODE
HIGHmypy/checker.py7623 min_len = typ.length() - 1CODE
Self-Referential Comments34 hits · 100 pts
SeverityFileLineSnippetContext
MEDIUMmisc/sync-typeshed.py188 # Create a commitCOMMENT
MEDIUMmypyc/build.py986 # Create a compiler object so we can make decisions based on whatCOMMENT
MEDIUMmypyc/irbuild/vec.py113 # Create an integer which will hold the type object * as an integral value.COMMENT
MEDIUMmypyc/irbuild/vec.py412 # Create an integer which will hold the type object * as an integral value.COMMENT
MEDIUMmypyc/irbuild/ll_builder.py1255 # Create a C array containing all arguments as boxed values.COMMENT
MEDIUMmypyc/irbuild/statement.py1304 # Create a new block for the instructions immediately following the yield expression, andCOMMENT
MEDIUMmypyc/irbuild/classdef.py484 # Create the classCOMMENT
MEDIUMmypyc/irbuild/generator.py424 # Define a variable representing the label to go to the next timeCOMMENT
MEDIUMmypyc/irbuild/callable_class.py64 # Define the actual callable class ClassIR, and set itsCOMMENT
MEDIUMmypyc/irbuild/for_helpers.py662 # Create a new block to handle cleanup after loop exit.COMMENT
MEDIUMmypyc/irbuild/for_helpers.py702 # Create a new cleanup block for when the loop is finished.COMMENT
MEDIUMmypyc/irbuild/for_helpers.py751 # Create a new cleanup block for when the loop is finished.COMMENT
MEDIUMmypyc/irbuild/for_helpers.py1196 # Create a register to store the state of the loop index andCOMMENT
MEDIUMmypyc/test/test_serialization.py3# This file is named test_serialization.py even though it doesn'tCOMMENT
MEDIUMmypyc/codegen/literals.py122 # The following methods return the C encodings of literal valuesCOMMENT
MEDIUMmypyc/codegen/emitwrapper.py160 # Define the arguments the function accepts (but no types yet)COMMENT
MEDIUMmypyc/primitives/misc_ops.py260# Create a heap type based on a template non-heap type.COMMENT
MEDIUMmypyc/primitives/misc_ops.py278# Create a dataclass from an extension class. SeeCOMMENT
MEDIUMdocs/source/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMmypy/build.py1898# This file is a cache directory tag automatically created by mypy.COMMENT
MEDIUMmypy/stubgen.py2028 # Create the output folder if it doesn't already exist.STRING
MEDIUMmypy/treetransform.py477 # This method is used when the transform result must be a NameExpr.COMMENT
MEDIUMmypy/semanal_newtype.py89 # Create the corresponding class definition if the aliased type is subtypeableCOMMENT
MEDIUMmypy/typeanal.py971 # Create a named TypedDictTypeCOMMENT
MEDIUMmypy/typeops.py397 # Create the type of self in subtype, of form t[a1, ...].COMMENT
MEDIUMmypy/applytype.py109 # Create a map from type variable id to target type.COMMENT
MEDIUMmypy/nodes.py4633 # Create an Instance similar to fill_typevars().COMMENT
MEDIUMmypy/nodes.py4655 # Create an Instance similar to fill_typevars().COMMENT
MEDIUMmypy/typestate.py30 """This class provides subtype caching to improve performance of subtype checks.STRING
MEDIUMmypy/checker.py6060 # Create a dummy subject expression to handle cases where a match statement's subjectCOMMENT
MEDIUMmypy/checker.py2543 # This method is a subtype of at least one union variant.COMMENT
MEDIUMmypy/checker.py8651 # This method is currently only used to decide whether to pairCOMMENT
MEDIUMmypy/plugins/functools.py241 # Create a valid context for various ad-hoc inspections in check_call().COMMENT
MEDIUMmypy/plugins/common.py292 # Create the final OverloadedFuncDef node:COMMENT
AI Slop Vocabulary45 hits · 82 pts
SeverityFileLineSnippetContext
MEDIUMmypyc/build.py723 # We let the test harness just pass in the c file contents insteadCOMMENT
LOWmypyc/build.py723 # We let the test harness just pass in the c file contents insteadCOMMENT
LOWmypyc/irbuild/ll_builder.py3005 # There's no __eq__ defined, so just use object identity.COMMENT
LOWmypyc/irbuild/callable_class.py185 # If accessed through the class, just return the callableCOMMENT
LOWmypyc/irbuild/function.py620 # If there are no decorators associated with the function, then just return theCOMMENT
LOWmypyc/irbuild/function.py1106 # the generated C code seems to expect that __init__ returns a char, so just return 1COMMENT
LOWmypyc/codegen/emitmodule.py161 # If we aren't doing validity checks, just return the cache dataCOMMENT
LOWmypyc/codegen/emitwrapper.py963 # Nothing special needs to done to handle errors, so just return.COMMENT
LOWmypyc/primitives/int_ops.py58 # Native ints don't have a separate type object -- we just use 'builtins.int'.COMMENT
MEDIUM…c/external/googletest/include/gtest/gtest-death-test.h146// This implementation is *not* meant to be as highly tuned or robustCOMMENT
MEDIUM…c/external/googletest/include/gtest/gtest-death-test.h218// In practice, this can be used to test functions that utilize theCOMMENT
LOWmypy/fastparse.py2089 # RawExpressionType so we just pass in 'None' for now. We'll report theCOMMENT
MEDIUMmypy/build.py4610 # to leverage parallelism as much as possible.COMMENT
LOWmypy/stubgen.py920 # just use Incomplete as the base class.COMMENT
LOWmypy/checkmember.py1081 # This is pretty bad, so just return the original signature ifCOMMENT
MEDIUMmypy/inspections.py552 # We are using a bit slower but robust way to find a module by path,COMMENT
MEDIUMmypy/meet.py725 # TODO: write a more robust algorithm for cases where both types are variadic.COMMENT
LOWmypy/meet.py608 # that came as fallbacks, so simply call is_subtype() to avoid code duplication.COMMENT
LOWmypy/types.py3391 # some other type, we just return that string repr directly.COMMENT
LOWmypy/types.py4072 # For bytes literals, the value is already escaped, just add quotes and b prefixCOMMENT
LOWmypy/join.py357 # in join_instances_via_supertype). Otherwise, just return the nominal join.COMMENT
LOWmypy/types_utils.py164 # Instead of using Tuple[Unpack[Tuple[...]]], just use Tuple[...]COMMENT
LOWmypy/typeanal.py1335 # fine to just return it as-is.COMMENT
LOWmypy/typeanal.py1837 # Types that we can just add directly to the literal/potential union of literals.COMMENT
LOWmypy/typeanal.py2885 # TypeAliasTypes are analyzed separately already, just return itCOMMENT
LOWmypy/typeops.py726 # with the same fallback, we can skip doing that work again and just add the typeCOMMENT
LOWmypy/messages.py2732 # No type arguments, just return the type nameCOMMENT
LOWmypy/messages.py3161 # For other TypeVarLikeTypes, just use the reprCOMMENT
LOWmypy/messages.py1845 # Nothing special here; just create the note:STRING
LOWmypy/plugin.py446# A no-op callback would just return the inferred return type, but a usefulCOMMENT
LOWmypy/solve.py276 # ...unless this is the only information we have, then we just pass it on.COMMENT
LOWmypy/nodes.py1307# TODO: we want to remove this at some point and just use `FuncBase` ideally.COMMENT
LOWmypy/checkexpr.py2112 # So we give up and just use function arguments for type inference, with just twoCOMMENT
LOWmypy/checkexpr.py3086 # We try returning a precise type if we can. If not, we give up and just return 'Any'.COMMENT
LOWmypy/checkexpr.py3727 # type of the left operand, as the operation will simply return False if the union's container/iteratorCOMMENT
LOWmypy/checkexpr.py4668 # indexing it seems benign to just return the upper bound item, similarCOMMENT
MEDIUMmypy/checker.py7620 # Homogeneous variadic item is the case where we are most flexible. Essentially,COMMENT
MEDIUMmypy/semanal.py4149 # TODO: find a more robust way to track the order of definitions.COMMENT
MEDIUMmypy/semanal.py6580 # TODO: this is not 100% robust for type variables nested within a classCOMMENT
LOWmypy/checkpattern.py308 # into individual items, so we just use its upper bound for the wholeCOMMENT
MEDIUMmypy/subtypes.py2223 # TODO: Implement more robust support for runtime isinstance() checks, see issue #3827.COMMENT
LOWmypy/stubtest.py392 # But we can't just return True here, because symtable doesn't know about symbolsCOMMENT
LOWmypy/plugins/enums.py221 # If this is the case, we simply return this type.COMMENT
MEDIUMmypy/plugins/dataclasses.py751 """Converts all attributes to @property methods in order toSTRING
LOWmypy/server/deps.py580 # dependencies from this so just return something. (The first,COMMENT
Modern Structural Boilerplate89 hits · 74 pts
SeverityFileLineSnippetContext
LOWmypyc/irbuild/ll_builder.py295 def set_module(self, module_name: str, module_path: str) -> None:CODE
LOWmypyc/irbuild/ll_builder.py337 def set_mem(self, ptr: Value, value_type: RType, value: Value) -> None:CODE
LOWmypyc/irbuild/ll_builder.py2836 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/util.py189 def set_mypyc_attr(key: str, value: Any, line: int) -> None:CODE
LOWmypyc/irbuild/builder.py319 def set_module(self, module_name: str, module_path: str) -> None:CODE
LOWmypyc/irbuild/builder.py505 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/specialize.py399 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/specialize.py438 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/for_helpers.py295 def set_item(item_index: Value) -> None:CODE
LOWmypyc/irbuild/for_helpers.py312 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/for_helpers.py375 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/analysis/attrdefined.py400def update_always_defined_attrs_using_subclasses(cl: ClassIR, seen: set[ClassIR]) -> None:CODE
LOWmypyc/test/testutil.py146def update_testcase_output(testcase: DataDrivenTestCase, output: list[str]) -> None:CODE
LOWmypyc/ir/ops.py299 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py339 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py375 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py392 def set_target(self, i: int, new: BasicBlock) -> None:CODE
LOWmypyc/ir/ops.py410 def set_target(self, i: int, new: BasicBlock) -> None:CODE
LOWmypyc/ir/ops.py420 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py474 def set_target(self, i: int, new: BasicBlock) -> None:CODE
LOWmypyc/ir/ops.py484 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py514 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py549 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py595 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py624 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py653 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py685 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py804 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py843 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py880 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py922 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py965 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1026 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1059 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1092 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1124 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1159 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1192 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1222 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1259 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1319 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1354 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1389 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1420 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1480 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1547 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1584 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1610 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1642 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1676 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1705 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1733 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1763 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1793 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1828 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1880 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1924 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/codegen/emit.py362 def set_undefined_value(self, target: str, rtype: RType) -> None:CODE
LOWmypyc/codegen/emitwrapper.py852 def set_target(self, fn: FuncIR) -> None:CODE
LOWmypy/fastparse.py584 def set_block_lines(self, b: Block, stmts: Sequence[ast3.stmt]) -> None:CODE
29 more matches not shown…
Redundant / Tautological Comments48 hits · 73 pts
SeverityFileLineSnippetContext
LOWmisc/test-stubgenc.sh25 # Check if generated stubs can actually be type checked by mypyCOMMENT
LOWmypyc/build_setup.py49 # Check if the matching argument contains a source filename.COMMENT
LOWmypyc/irbuild/ll_builder.py647 # Check if value < upper_boundCOMMENT
LOWmypyc/irbuild/ll_builder.py655 # Check if value >= lower_boundCOMMENT
LOWmypyc/irbuild/prebuildvisitor.py294 # Check if child is nested within fdef (possibly indirectlyCOMMENT
LOWmypyc/irbuild/statement.py1015 # Check if we have a return valueCOMMENT
LOWmypyc/irbuild/statement.py1032 # Check if we need to reraise the original exception from sys.exc_infoCOMMENT
LOWmypyc/irbuild/statement.py1036 # Check if exc_type is NoneCOMMENT
LOWmypyc/irbuild/statement.py1072 # Check if we're in an async function with a finally block that contains awaitCOMMENT
LOWmypyc/irbuild/classdef.py642 # Check if the metaclass defines a __prepare__ method, and if so, call it.COMMENT
LOWmypyc/irbuild/specialize.py275 # Check if there's a specializer for this dunder method and typeCOMMENT
LOWmypyc/irbuild/specialize.py801 # Return the resultCOMMENT
LOWmypyc/irbuild/specialize.py1419 # Check if the adjusted index is in valid rangeCOMMENT
LOWmypyc/irbuild/specialize.py1479 # Check if the adjusted index is in valid rangeCOMMENT
LOWmypyc/lib-rt/build_setup.py49 # Check if the matching argument contains a source filename.COMMENT
LOWmypyc/analysis/attrdefined.py182 # Check if __init__ can run unpredictable code (leak 'self').COMMENT
LOWmypyc/primitives/misc_ops.py113# Check if the current exception is a StopIteration and return its value if so.COMMENT
LOWmypy/fastparse.py674 # Check if stmts are reachable and add them to current_overload,COMMENT
LOWmypy/build.py2085 # Check if plugins are still the same.COMMENT
LOWmypy/expandtype.py253 # Set prefix to something empty, so we don't duplicate it below.COMMENT
LOWmypy/exprtotype.py115 # Check if the type is Annotated[...]. For this we need the fullname,COMMENT
LOWmypy/checkmember.py1241 # Check if original variable type has type variables. For example:COMMENT
LOWmypy/ipc.py94 # Check if we already have a message in the buffer beforeCOMMENT
LOWmypy/ipc.py128 # Check if we already have a message in the buffer beforeCOMMENT
LOWmypy/util.py618 # Check if we are in a human-facing terminal on a supported platform.COMMENT
LOWmypy/checkstrformat.py608 # Check if there are any other errors (like missing members).COMMENT
LOWmypy/nativeparse.py1306 # Check if this is a super() call - if so, convert to SuperExprCOMMENT
LOWmypy/nativeparse.py1924 # Check if stmts are reachable and add them to current_overload,COMMENT
LOWmypy/stubgenc.py321 # Check if the argument has a default valueCOMMENT
LOWmypy/semanal_main.py507 # Check if the class definition itself triggers a dataclass transform (via a parent class/COMMENT
LOWmypy/constraints.py1575 # Set TypeVarTuple to empty to improve error messages.COMMENT
LOWmypy/semanal_shared.py438 # Check if there is a metaclass that is decorated with `typing.dataclass_transform`COMMENT
LOWmypy/checker.py784 # Check if assignment widened the inferred type of a variable; in this case weCOMMENT
LOWmypy/checker.py859 # Check if the setter can accept two positional arguments.COMMENT
LOWmypy/checker.py1668 # Check if __init__ has an invalid return type.COMMENT
LOWmypy/checker.py2522 # Check if this override is covariant.COMMENT
LOWmypy/checker.py3518 # Check if the nearest common ancestor frame for the definition siteCOMMENT
LOWmypy/checker.py3698 # Check if we are a class variable with at least one base classCOMMENT
LOWmypy/semanal.py3949 # Check if there is a definition in supertype. If yes, we can't safelyCOMMENT
LOWmypy/semanal.py2228 # Check if the class definition itself triggers a dataclass transform (via a parent class/COMMENT
LOWmypy/checkpattern.py184 # Check if other subpatterns capture the same namesCOMMENT
LOWmypy/test/test_nativeparse.py102 # Check if we should skip function bodies (when ignoring errors)COMMENT
LOWmypy/test/helpers.py186 # Display message that helps visualize the differences between twoCOMMENT
LOWmypy/plugins/attrs.py362 # Check if attribute types are ready.COMMENT
LOWmypy/plugins/attrs.py526 # Check if the right hand side is a call to an attribute maker.COMMENT
LOWmypy/plugins/attrs.py562 # Check if the right hand side is a call to an attribute maker.COMMENT
LOWmypy/server/update.py953 # Add it to the queue of files that need to be processed fully.COMMENT
LOWmypy/server/update.py1049 # Check if any attribute types were changed and need to be propagated further.COMMENT
Excessive Try-Catch Wrapping44 hits · 48 pts
SeverityFileLineSnippetContext
MEDIUMmisc/analyze_typeform_stats.py45 print("Error: Could not find all required counters in output")CODE
LOWmypyc/crash.py14 except Exception:CODE
LOWmypyc/test/test_external.py61 except Exception as err:CODE
LOWmypyc/test-data/driver/driver.py29 except Exception as e:CODE
MEDIUMmypy/build.py703 print(f"Error calling the plugin(version) entry point of {plugin_path}\n", file=stdout)CODE
MEDIUMmypy/build.py721 print(f"Error constructing plugin instance of {plugin_type.__name__}\n", file=stdout)CODE
MEDIUMmypy/build.py3595 print(f"Error serializing {self.id}", file=self.manager.stdout)CODE
LOWmypy/build.py309 except Exception as exc:CODE
LOWmypy/build.py686 except Exception as exc:CODE
LOWmypy/build.py702 except Exception:CODE
LOWmypy/build.py720 except Exception:CODE
LOWmypy/build.py1760 except Exception as e:CODE
LOWmypy/build.py3078 except Exception as err:CODE
LOWmypy/build.py3594 except Exception:CODE
LOWmypy/moduleinspect.py65 except Exception:CODE
LOWmypy/ipc.py369 except Exception as e:CODE
LOWmypy/dmypy_util.py30 except Exception as e:CODE
LOWmypy/dmypy_server.py244 except Exception:CODE
LOWmypy/dmypy_server.py1118 except Exception:CODE
LOWmypy/errors.py1345 except Exception as e:CODE
LOWmypy/stubutil.py149 except Exception as e:CODE
LOWmypy/checkexpr.py6223 except Exception as err:CODE
LOWmypy/__main__.py36 except Exception as e:CODE
LOWmypy/__main__.py43 except Exception:CODE
MEDIUMmypy/__main__.py14def console_entry() -> None:CODE
LOWmypy/checker.py766 except Exception as err:CODE
LOWmypy/semanal.py7733 except Exception as err:CODE
LOWmypy/stubtest.py1486 except Exception:CODE
LOWmypy/stubtest.py264 except Exception as e:CODE
LOWmypy/stubtest.py402 except Exception:CODE
LOWmypy/stubtest.py455 except Exception:CODE
LOWmypy/stubtest.py493 except Exception:CODE
LOWmypy/stubtest.py501 except Exception:CODE
LOWmypy/stubtest.py715 except Exception:CODE
LOWmypy/stubtest.py883 except Exception:CODE
LOWmypy/stubtest.py1896 except Exception:CODE
LOWmypy/stubtest.py1934 except Exception:CODE
LOWmypy/stubtest.py1961 except Exception:CODE
LOWmypy/build_worker/worker.py109 except Exception as exc:CODE
MEDIUMmypy/build_worker/worker.py110 print(f"Error writing status file {status_file}:", exc)CODE
MEDIUMmypy/build_worker/worker.py129 print("Error communicating with coordinator:", exc)CODE
LOWmypy/build_worker/worker.py130 except Exception as exc:CODE
LOWmypy/dmypy/client.py275 except Exception:CODE
LOWmypy/test/data.py336 except Exception:CODE
Structural Annotation Overuse22 hits · 34 pts
SeverityFileLineSnippetContext
LOWmypy/typeops.py637 # Step 1: expand all nested unionsCOMMENT
LOWmypy/typeops.py640 # Step 2: fast path for single itemCOMMENT
LOWmypy/typeops.py644 # Step 3: remove redundant unionsCOMMENT
LOWmypy/typeops.py647 # Step 4: If more than one literal exists in the union, try to simplifyCOMMENT
LOWmypy/typeops.py660 # Step 5: At last, we erase any (inconsistent) extra attributes on instances.COMMENT
LOWmypy/checkexpr.py2834 # Step 1: Filter call targets to remove ones where the argument counts don't matchCOMMENT
LOWmypy/checkexpr.py2839 # Step 2: If the arguments contain a union, we try performing union math first,COMMENT
LOWmypy/checkexpr.py3186 # Step 1: If we are already too deep, then stop immediately. Otherwise mypy mightCOMMENT
LOWmypy/checkexpr.py3192 # Step 2: Find position of the first union in arguments. Return the normal inferredCOMMENT
LOWmypy/checkexpr.py2884 # Step 3: We try checking each branch one-by-one.COMMENT
LOWmypy/checkexpr.py2917 # Step 4: Failure. At this point, we know there is no match. We fall back to tryingCOMMENT
LOWmypy/checkexpr.py2930 # Step 5: We try and infer a second-best alternative if possible. If not, fall backCOMMENT
LOWmypy/checkexpr.py3214 # Step 3: Try a direct match before splitting to avoid unnecessary union splitsCOMMENT
LOWmypy/checkexpr.py3234 # Step 4: Split the first remaining union type in arguments into items andCOMMENT
LOWmypy/checkexpr.py3260 # Step 5: If splitting succeeded, then filter out duplicate items before returning.COMMENT
LOWmypy/checkexpr.py4324 # Step 1: We first try leaving the right arguments alone and destructureCOMMENT
LOWmypy/checkexpr.py4348 # Step 2: If that fails, we try again but also destructure the right argument.COMMENT
LOWmypy/fixup.py60 # NOTE: This method isn't (yet) part of the NodeVisitor API.COMMENT
LOWmypy/fixup.py115 # NOTE: This method *definitely* isn't part of the NodeVisitor API.COMMENT
LOWmypy/checker.py6749 # Step 1: Obtain the types of each operand and whether or not we canCOMMENT
LOWmypy/checker.py6783 # Step 2: Group operands chained by either the 'is' or '==' operandsCOMMENT
LOWmypy/checker.py6803 # Step 3: Analyze each group and infer more precise type maps for eachCOMMENT
Verbosity Indicators20 hits · 32 pts
SeverityFileLineSnippetContext
LOWmypy/typeops.py637 # Step 1: expand all nested unionsCOMMENT
LOWmypy/typeops.py640 # Step 2: fast path for single itemCOMMENT
LOWmypy/typeops.py644 # Step 3: remove redundant unionsCOMMENT
LOWmypy/typeops.py647 # Step 4: If more than one literal exists in the union, try to simplifyCOMMENT
LOWmypy/typeops.py660 # Step 5: At last, we erase any (inconsistent) extra attributes on instances.COMMENT
LOWmypy/checkexpr.py2834 # Step 1: Filter call targets to remove ones where the argument counts don't matchCOMMENT
LOWmypy/checkexpr.py2839 # Step 2: If the arguments contain a union, we try performing union math first,COMMENT
LOWmypy/checkexpr.py3186 # Step 1: If we are already too deep, then stop immediately. Otherwise mypy mightCOMMENT
LOWmypy/checkexpr.py3192 # Step 2: Find position of the first union in arguments. Return the normal inferredCOMMENT
LOWmypy/checkexpr.py2884 # Step 3: We try checking each branch one-by-one.COMMENT
LOWmypy/checkexpr.py2917 # Step 4: Failure. At this point, we know there is no match. We fall back to tryingCOMMENT
LOWmypy/checkexpr.py2930 # Step 5: We try and infer a second-best alternative if possible. If not, fall backCOMMENT
LOWmypy/checkexpr.py3214 # Step 3: Try a direct match before splitting to avoid unnecessary union splitsCOMMENT
LOWmypy/checkexpr.py3234 # Step 4: Split the first remaining union type in arguments into items andCOMMENT
LOWmypy/checkexpr.py3260 # Step 5: If splitting succeeded, then filter out duplicate items before returning.COMMENT
LOWmypy/checkexpr.py4324 # Step 1: We first try leaving the right arguments alone and destructureCOMMENT
LOWmypy/checkexpr.py4348 # Step 2: If that fails, we try again but also destructure the right argument.COMMENT
LOWmypy/checker.py6749 # Step 1: Obtain the types of each operand and whether or not we canCOMMENT
LOWmypy/checker.py6783 # Step 2: Group operands chained by either the 'is' or '==' operandsCOMMENT
LOWmypy/checker.py6803 # Step 3: Analyze each group and infer more precise type maps for eachCOMMENT
Decorative Section Separators10 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMmypy/main.py412 # =====================COMMENT
MEDIUMmypy/main.py414 # =====================COMMENT
MEDIUMmypy/main.py431 # ===============COMMENT
MEDIUMmypy/main.py433 # ===============COMMENT
MEDIUMmypy/stubtest.py213# ====================COMMENT
MEDIUMmypy/stubtest.py215# ====================COMMENT
MEDIUMmypy/stubtest.py1756# ====================COMMENT
MEDIUMmypy/stubtest.py1758# ====================COMMENT
MEDIUMmypy/stubtest.py2158# ====================COMMENT
MEDIUMmypy/stubtest.py2160# ====================COMMENT
AI Structural Patterns29 hits · 25 pts
SeverityFileLineSnippetContext
LOWmisc/analyze_cache.py118CODE
LOWmypyc/build.py875CODE
LOWmypyc/options.py7CODE
LOWmypyc/irbuild/context.py15CODE
LOWmypyc/irbuild/specialize.py1439CODE
LOWmypyc/primitives/registry.py95CODE
LOWmypyc/primitives/registry.py163CODE
LOWmypyc/primitives/registry.py214CODE
LOWmypyc/primitives/registry.py264CODE
LOWmypyc/primitives/registry.py304CODE
LOWmypyc/primitives/registry.py347CODE
LOWmypy/fastparse.py2167CODE
LOWmypy/stubgen.py1720CODE
LOWmypy/checkmember.py165CODE
LOWmypy/exportjson.py272CODE
LOWmypy/types.py2176CODE
LOWmypy/types.py2236CODE
LOWmypy/join.py920CODE
LOWmypy/typeanal.py204CODE
LOWmypy/gclogger.py48CODE
LOWmypy/errors.py594CODE
LOWmypy/nodes.py4250CODE
LOWmypy/main.py1408CODE
LOWmypy/semanal_shared.py187CODE
LOWmypy/semanal.py7736CODE
LOWmypy/semanal.py7791CODE
LOWmypy/semanal.py7840CODE
LOWmypy/subtypes.py91CODE
LOWmypy/test/helpers.py521CODE
Cross-File Repetition5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHmypyc/test/test_annotate.py0perform a runtime checking transformation test case.STRING
HIGHmypyc/test/test_irbuild.py0perform a runtime checking transformation test case.STRING
HIGHmypyc/test/test_refcount.py0perform a runtime checking transformation test case.STRING
HIGHmypyc/test/test_exceptions.py0perform a runtime checking transformation test case.STRING
HIGHmypyc/test/test_alwaysdefined.py0perform a runtime checking transformation test case.STRING
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALmypy/plugins/common.py252 cls.info.defn.defs.body.append(func)CODE
CRITICALmypy/plugins/common.py301 cls.info.defn.defs.body.append(overload_def)CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHmypy/server/deps.py342 # In this example we add <Super[wildcard]> -> <Sub>, to invalidate Sub ifCOMMENT
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
LOWmypyc/irbuild/env_class.py137 # If this is a FuncDef, then make sure to load the FuncDef into its own environmentCOMMENT
LOWmypy/types.py81# make sure to audit the following methods:COMMENT
MEDIUMmypy/errors.py110 # For errors on the same line you can use this to customize their sortingCOMMENT
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWmisc/analyze_cache.py92 def helper(chunk: JsonDict) -> JsonDict:CODE
LOWmisc/analyze_cache.py124 def helper(chunk: JsonDict) -> JsonDict:CODE
LOWmypy/semanal_pass1.py48 def do_stuff() -> None:STRING
LOWmypy/semanal.py628 def helper(defs: list[Statement]) -> None:CODE
TODO Padding2 hits · 2 pts
SeverityFileLineSnippetContext
LOWmypy/checkexpr.py6206 # TODO: consider using cache for more expression kinds.COMMENT
LOWmypy/server/deps.py200 # TODO: Add tests for this function.COMMENT