AI Slop Code RIsk Monitor

python/mypy

Optional static typing for Python

13.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for python/mypy, a Python project with 20,674 GitHub stars. SynthScan examined 249,301 lines of code across 652 source files, recording 3327 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 13.9 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

13.9
Adjusted Signal
13.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
20.7K
Stars
Python
Language
249.3K
Lines of Code
652
Files
3.3K
Pattern Hits
2026-10-12
Scan Date
0.13
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 39.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 2723 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.6/100 · LOW

Are imports declared and package/API names verified? 421 finding(s).

Agent Over-Engineering Ratio 25.8/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 1505 finding(s).

PR Review Velocity Impact 54.0/100 · HIGH

Which changes need focused human review? 3327 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 80MEDIUM 64LOW 3181

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3327 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1291 hits · 1117 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.py288def generate_c_extension_shim(CODE
LOWmypyc/build.py498def _patch_setuptools_copy_extensions_to_source() -> None:CODE
LOWmypyc/annotate.py275 def visit_dictionary_comprehension(self, o: DictionaryComprehension, /) -> None:CODE
LOWmypyc/common.py57def generator_frame_attribute_prefix(class_fullname: str, *, is_final_class: bool) -> str:CODE
LOWmypyc/common.py64def source_name_from_generator_attribute(name: str, class_fullname: str) -> str: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.py1922 def translate_instance_contains(self, inst: Value, item: Value, op: str, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py1945 def _non_specialized_unary_op(self, value: Value, op: str, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py2707 def inline_fixed_width_divide(self, type: RType, lhs: Value, rhs: Value, line: int) -> Value:CODE
LOWmypyc/irbuild/ll_builder.py2841 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/ll_builder.py2911 def translate_special_method_call(CODE
LOWmypyc/irbuild/ll_builder.py2939 def _translate_special_low_level_method_call(CODE
LOWmypyc/irbuild/ll_builder.py3021 def _translate_fast_optional_eq_cmp(CODE
LOWmypyc/irbuild/util.py276def get_explicit_native_class(path: str, cdef: ClassDef, errors: Errors) -> bool | None:CODE
LOWmypyc/irbuild/util.py322def 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.py40def _comprehension_has_lambda(node: GeneratorExpr | DictionaryComprehension) -> bool:CODE
LOWmypyc/irbuild/prebuildvisitor.py220 def _visit_comprehension_with_scope(self, o: GeneratorExpr | DictionaryComprehension) -> None:CODE
LOWmypyc/irbuild/prebuildvisitor.py263 def visit_dictionary_comprehension(self, o: DictionaryComprehension) -> None:CODE
LOWmypyc/irbuild/env_class.py331def 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.py171def transform_expression_stmt(builder: IRBuilder, stmt: ExpressionStmt) -> None:CODE
LOWmypyc/irbuild/statement.py197def check_unsupported_cls_assignment(builder: IRBuilder, stmt: AssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py229def transform_assignment_stmt(builder: IRBuilder, stmt: AssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py305def transform_operator_assignment_stmt(builder: IRBuilder, stmt: OperatorAssignmentStmt) -> None:CODE
LOWmypyc/irbuild/statement.py330def import_globals_id_and_name(module_id: str, as_name: str | None) -> tuple[str, str]:CODE
LOWmypyc/irbuild/statement.py391def split_import_group_to_python_and_native(CODE
LOWmypyc/irbuild/statement.py418def transform_imports_without_grouping(CODE
LOWmypyc/irbuild/statement.py436def transform_non_native_import_group(CODE
LOWmypyc/irbuild/statement.py545def transform_import_from_buckets(CODE
LOWmypyc/irbuild/statement.py784def transform_try_except_stmt(builder: IRBuilder, t: TryStmt) -> None:CODE
LOWmypyc/irbuild/statement.py872def try_finally_resolve_control(CODE
LOWmypyc/irbuild/statement.py917def transform_try_finally_stmt(CODE
LOWmypyc/irbuild/statement.py954def transform_try_finally_stmt_async(CODE
LOWmypyc/irbuild/statement.py1511def transform_yield_from_expr(builder: IRBuilder, o: YieldFromExpr) -> Value:CODE
LOWmypyc/irbuild/statement.py1523def 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
LOW⚡mypyc/irbuild/builder.py1680 def is_free_variable_in_nested_func(self, fitem: FuncItem, symbol: SymbolNode) -> bool:CODE
LOW⚡mypyc/irbuild/builder.py1688 def is_captured_by_nested_func(self, symbol: SymbolNode) -> bool:CODE
LOW⚡mypyc/irbuild/builder.py1694 def add_var_to_generator_frame(CODE
LOWmypyc/irbuild/builder.py404 def load_bytes_from_str_literal(self, value: str, line: int = -1) -> Value:CODE
LOWmypyc/irbuild/builder.py509 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/builder.py694 def maybe_add_implicit_return(self) -> None:CODE
1231 more matches not shown…
Deep Nesting663 hits · 518 pts
SeverityFileLineSnippetContext
LOWmisc/apply-cache-diff.py34CODE
LOWmisc/diff-cache.py154CODE
LOWmisc/gen_blog_post_html.py40CODE
LOWmypyc/build.py660CODE
LOWmypyc/build.py719CODE
LOWmypyc/build.py813CODE
LOWmypyc/build.py904CODE
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/targets.py45CODE
LOWmypyc/irbuild/ll_builder.py465CODE
LOWmypyc/irbuild/ll_builder.py969CODE
LOWmypyc/irbuild/ll_builder.py1374CODE
LOWmypyc/irbuild/ll_builder.py1644CODE
LOWmypyc/irbuild/ll_builder.py2028CODE
LOWmypyc/irbuild/ll_builder.py2068CODE
LOWmypyc/irbuild/ll_builder.py2211CODE
LOWmypyc/irbuild/ll_builder.py2383CODE
LOWmypyc/irbuild/ll_builder.py2501CODE
LOWmypyc/irbuild/ll_builder.py2639CODE
LOWmypyc/irbuild/ll_builder.py2757CODE
LOWmypyc/irbuild/util.py72CODE
LOWmypyc/irbuild/util.py190CODE
LOWmypyc/irbuild/util.py218CODE
LOWmypyc/irbuild/util.py276CODE
LOWmypyc/irbuild/mapper.py73CODE
LOWmypyc/irbuild/prebuildvisitor.py168CODE
LOWmypyc/irbuild/env_class.py273CODE
LOWmypyc/irbuild/format_str_tokenizer.py48CODE
LOWmypyc/irbuild/format_str_tokenizer.py135CODE
LOWmypyc/irbuild/format_str_tokenizer.py211CODE
LOWmypyc/irbuild/statement.py545CODE
LOWmypyc/irbuild/statement.py1277CODE
LOWmypyc/irbuild/constant_fold.py39CODE
LOWmypyc/irbuild/builder.py1886CODE
LOWmypyc/irbuild/builder.py785CODE
LOWmypyc/irbuild/builder.py807CODE
LOWmypyc/irbuild/builder.py924CODE
LOWmypyc/irbuild/builder.py1125CODE
LOWmypyc/irbuild/builder.py1441CODE
LOWmypyc/irbuild/classdef.py89CODE
LOWmypyc/irbuild/classdef.py571CODE
LOWmypyc/irbuild/specialize.py775CODE
LOWmypyc/irbuild/specialize.py917CODE
LOWmypyc/irbuild/specialize.py980CODE
LOWmypyc/irbuild/specialize.py1048CODE
LOWmypyc/irbuild/specialize.py1100CODE
LOWmypyc/irbuild/specialize.py1161CODE
LOWmypyc/irbuild/specialize.py1181CODE
LOWmypyc/irbuild/specialize.py1205CODE
LOWmypyc/irbuild/specialize.py1415CODE
LOWmypyc/irbuild/main.py59CODE
603 more matches not shown…
Over-Commented Block558 hits · 500 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md3041 # Change in semantics: previously considered members,COMMENT
LOWdev-requirements.txt1#COMMENT
LOWdev-requirements.txt21execnet==2.1.2COMMENT
LOWdev-requirements.txt41 # via -r test-requirements.txtCOMMENT
LOWdev-requirements.txt61 # pytestCOMMENT
LOWdev-requirements.txt81 # via virtualenvCOMMENT
LOWtest-requirements.txt1#COMMENT
LOWtest-requirements.txt21lxml==6.1.2 ; python_version < "3.16"COMMENT
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.py101# Minimum value for a short tagged integer.COMMENT
LOWmypyc/irbuild/prebuildvisitor.py81 super().__init__()COMMENT
LOWmypyc/irbuild/statement.py361 #COMMENT
LOWmypyc/irbuild/nonlocalcontrol.py101 gen_generator_func_cleanup(builder, line)COMMENT
LOWmypyc/irbuild/callable_class.py61 class for the nested function.COMMENT
LOWmypyc/irbuild/specialize.py181Specializer = Callable[["IRBuilder", CallExpr, RefExpr], Value | None]COMMENT
LOWmypyc/irbuild/function.py941def load_type(builder: IRBuilder, typ: TypeInfo, unbounded_type: Type | None, line: int) -> Value:COMMENT
LOWmypyc/lib-rt/dict_ops.c1// Dict primitive operationsCOMMENT
LOWmypyc/lib-rt/misc_ops.c1#include "pythoncapi_compat.h"COMMENT
LOWmypyc/lib-rt/CPy.h1// Mypyc C APICOMMENT
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.h61// shared-refcount CAS, field validation, and per-object lock fallback -- is inCOMMENT
LOWmypyc/lib-rt/pythonsupport.h81 return v;COMMENT
LOWmypyc/lib-rt/pythonsupport.h101// mov/ldr).COMMENT
LOWmypyc/lib-rt/pythonsupport.h141 Py_END_CRITICAL_SECTION();COMMENT
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/mypyc_util.h1#ifndef MYPYC_UTIL_HCOMMENT
LOWmypyc/lib-rt/mypyc_util.h21#elif defined(_MSC_VER)COMMENT
LOWmypyc/lib-rt/mypyc_util.h41#elif defined(_MSC_VER)COMMENT
LOWmypyc/lib-rt/mypyc_util.h61 #define CPY_UNROLL_LOOP_IMPL(x) _Pragma(CPY_STRINGIFY(x))COMMENT
LOWmypyc/lib-rt/mypyc_util.h101 _Py_Dealloc(op);COMMENT
LOWmypyc/lib-rt/mypyc_util.h141// Tag bit used for long integersCOMMENT
LOWmypyc/lib-rt/mypyc_util.h181#define CPY_SIGN_ZERO 1COMMENT
LOWmypyc/lib-rt/mypyc_util.h201#define CPY_LONG_SIZE_SIGNED(o) ((o)->ob_base.ob_size)COMMENT
LOWmypyc/lib-rt/strings/librt_strings.c1#include "pythoncapi_compat.h"COMMENT
498 more matches not shown…
Unused Imports380 hits · 370 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.py25CODE
LOWmypyc/build.py167CODE
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
320 more matches not shown…
Cross-Language Confusion39 hits · 225 pts
SeverityFileLineSnippetContext
HIGHmypyc/irbuild/ll_builder.py1855 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.py417 ComparisonOp(generic_getattr_result, null, ComparisonOp.NEQ, line)CODE
HIGHmypyc/irbuild/function.py460 is_delattr = builder.add(ComparisonOp(value_arg, null, ComparisonOp.EQ, line))CODE
HIGHmypyc/irbuild/function.py475 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.py1686 return f"{emitter.ctype_spaced(typ)}{static_name} = {undefined};"CODE
HIGHmypyc/codegen/emitfunc.py452 with a locked fallback and returns a new reference (or NULL if undefined, whichSTRING
HIGHmypyc/codegen/emitfunc.py574 # undefined, which is precisely the error value here, so the "NULL withoutCOMMENT
HIGHmypyc/codegen/emitfunc.py652 # previously undefined), so decref the old value.COMMENT
HIGHmypyc/codegen/emit.py1097 self.emit_lines(f"if ({dest} == -1.0 && PyErr_Occurred()) {{", failure, "}")CODE
HIGHmypyc/transform/spill.py103 block.ops.extend([null, SetAttr(frame_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
HIGH⚡mypy/types.py2817 return self.length() > 0CODE
HIGH⚡mypy/types.py2824 if self.length() == 0:CODE
HIGH⚡mypy/types.py2826 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
HIGH⚡mypy/checkexpr.py4649 return left.length()CODE
HIGH⚡mypy/checkexpr.py4653 return left.length() - 1 + unpack.type.min_lenCODE
HIGH⚡mypy/checkexpr.py4654 return left.length() - 1CODE
HIGHmypy/checkexpr.py4680 extra_items = self.min_tuple_length(left) - left.length() + 1CODE
HIGH⚡mypy/checker.py7696 if method(typ.length(), size):CODE
HIGH⚡mypy/checker.py7706 min_len = typ.length() - 1 + unpacked.min_lenCODE
HIGH⚡mypy/checker.py7718 unpack = UnpackType(unpacked.copy_modified(min_len=size - typ.length() + 1))CODE
HIGH⚡mypy/checker.py7727 min_len = typ.length() - 1CODE
Empty Error Handlers35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHmypyc/build.py164except ImportError:CODE
HIGHmypyc/build.py791except OSError:CODE
HIGHmypyc/build_setup.py12except ImportError:CODE
HIGHmypyc/__main__.py43except FileExistsError:CODE
HIGHmypyc/irbuild/builder.py374except UnsupportedException:CODE
HIGHmypyc/irbuild/for_helpers.py1377except ValueError: # prevent crash if invalid argsCODE
HIGHmypyc/lib-rt/build_setup.py12except ImportError:CODE
HIGHmypyc/ir/class_ir.py379except KeyError:CODE
HIGHmypy/build.py786except OSError:CODE
HIGHmypy/build.py1879except FileExistsError:CODE
HIGHmypy/build.py1895except FileExistsError:CODE
HIGHmypy/build.py461except (OSError, IPCException):CODE
HIGHmypy/build.py2348except OSError:CODE
HIGHmypy/build.py3721except (ModuleNotFound, CompileError):CODE
HIGHmypy/build.py4288except OSError:CODE
HIGHmypy/util.py418except AttributeError:CODE
HIGHmypy/stubgenc.py285except TypeError:CODE
HIGHmypy/dmypy_server.py275except OSError:CODE
HIGHmypy/dmypy_server.py256except OSError:CODE
HIGHmypy/messages.py3373except KeyError:CODE
HIGHmypy/checkexpr.py545except KeyError:CODE
HIGHmypy/__main__.py43except Exception:CODE
HIGHmypy/report.py70except KeyError:CODE
HIGHmypy/fscache.py76except OSError:CODE
HIGHmypy/stubtest.py493except Exception:CODE
HIGHmypy/stubtest.py402except Exception:CODE
HIGHmypy/stubtest.py1966except Exception:CODE
HIGHmypy/stubtest.py182except (OSError, TypeError, SyntaxError):CODE
HIGHmypy/stubtest.py186except TypeError:CODE
HIGHmypy/stubtest.py386except KeyError:CODE
HIGHmypy/stubtest.py2004except Exception:CODE
HIGHmypy/stubtest.py2293except BaseException:CODE
HIGHmypy/dmypy/client.py317except BadStatus:CODE
HIGHmypy/dmypy/client.py339except BadStatus:CODE
HIGHmypy/server/objgraph.py50except AssertionError:CODE
Self-Referential Comments35 hits · 102 pts
SeverityFileLineSnippetContext
MEDIUMmisc/sync-typeshed.py188 # Create a commitCOMMENT
MEDIUMmypyc/build.py1016 # 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.py1316 # Create a new block for the instructions immediately following the yield expression, andCOMMENT
MEDIUMmypyc/irbuild/classdef.py491 # Create the classCOMMENT
MEDIUMmypyc/irbuild/callable_class.py80 # Define the actual callable class ClassIR, and set itsCOMMENT
MEDIUMmypyc/irbuild/for_helpers.py664 # Create a new block to handle cleanup after loop exit.COMMENT
MEDIUMmypyc/irbuild/for_helpers.py704 # Create a new cleanup block for when the loop is finished.COMMENT
MEDIUMmypyc/irbuild/for_helpers.py708 # Define a target containing the iterator used by the for-loop. The generator spillCOMMENT
MEDIUMmypyc/irbuild/for_helpers.py810 # Define a target containing the iterator used by the for-loop. The generator spillCOMMENT
MEDIUMmypyc/irbuild/for_helpers.py1228 # 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/emitclass.py1508 # Creating the wrapper may run arbitrary code (e.g. via GC), which couldCOMMENT
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.py342# Create a heap type based on a template non-heap type.COMMENT
MEDIUMmypyc/primitives/misc_ops.py360# 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.py1892# 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.py90 # Create the corresponding class definition if the aliased type is subtypeableCOMMENT
MEDIUMmypy/typeanal.py979 # Create a named TypedDictTypeCOMMENT
MEDIUMmypy/typeops.py398 # 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.py4648 # Create an Instance similar to fill_typevars().COMMENT
MEDIUMmypy/nodes.py4670 # Create an Instance similar to fill_typevars().COMMENT
MEDIUMmypy/typestate.py30 """This class provides subtype caching to improve performance of subtype checks.STRING
MEDIUM⚡mypy/checker.py6158 # Create a dummy subject expression to handle cases where a match statement's subjectCOMMENT
MEDIUMmypy/checker.py2566 # This method is a subtype of at least one union variant.COMMENT
MEDIUMmypy/checker.py8755 # 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 · 81 pts
SeverityFileLineSnippetContext
MEDIUMmypyc/build.py751 # We let the test harness just pass in the c file contents insteadCOMMENT
LOWmypyc/build.py751 # We let the test harness just pass in the c file contents insteadCOMMENT
LOWmypyc/irbuild/ll_builder.py3010 # There's no __eq__ defined, so just use object identity.COMMENT
LOWmypyc/irbuild/callable_class.py221 # If accessed through the class, just return the callableCOMMENT
LOWmypyc/irbuild/function.py641 # If there are no decorators associated with the function, then just return theCOMMENT
LOW⚡mypyc/irbuild/function.py1127 # the generated C code seems to expect that __init__ returns a char, so just return 1COMMENT
LOWmypyc/codegen/emitmodule.py178 # If we aren't doing validity checks, just return the cache dataCOMMENT
LOWmypyc/codegen/emitwrapper.py996 # 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.py2097 # RawExpressionType so we just pass in 'None' for now. We'll report theCOMMENT
MEDIUMmypy/build.py4663 # to leverage parallelism as much as possible.COMMENT
LOWmypy/stubgen.py920 # just use Incomplete as the base class.COMMENT
LOWmypy/checkmember.py1087 # 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.py3366 # some other type, we just return that string repr directly.COMMENT
LOWmypy/types.py4051 # 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.py1359 # fine to just return it as-is.COMMENT
LOWmypy/typeanal.py1861 # Types that we can just add directly to the literal/potential union of literals.COMMENT
LOWmypy/typeanal.py2909 # TypeAliasTypes are analyzed separately already, just return itCOMMENT
LOWmypy/typeops.py727 # 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.py3166 # 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.py2148 # So we give up and just use function arguments for type inference, with just twoCOMMENT
LOWmypy/checkexpr.py3123 # We try returning a precise type if we can. If not, we give up and just return 'Any'.COMMENT
LOWmypy/checkexpr.py3728 # type of the left operand, as the operation will simply return False if the union's container/iteratorCOMMENT
LOWmypy/checkexpr.py4669 # indexing it seems benign to just return the upper bound item, similarCOMMENT
MEDIUM⚡mypy/checker.py7724 # Homogeneous variadic item is the case where we are most flexible. Essentially,COMMENT
MEDIUMmypy/semanal.py4230 # TODO: find a more robust way to track the order of definitions.COMMENT
MEDIUMmypy/semanal.py6668 # 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.py2401 # 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.py764 """Converts all attributes to @property methods in order toSTRING
LOWmypy/server/deps.py581 # 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.py2841 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/util.py225 def set_mypyc_attr(key: str, value: Any, line: int) -> None:CODE
LOWmypyc/irbuild/builder.py323 def set_module(self, module_name: str, module_path: str) -> None:CODE
LOWmypyc/irbuild/builder.py509 def set_immortal_if_free_threaded(self, v: Value, line: int) -> None:CODE
LOWmypyc/irbuild/specialize.py445 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/specialize.py484 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/for_helpers.py296 def set_item(item_index: Value) -> None:CODE
LOWmypyc/irbuild/for_helpers.py313 def set_item(x: Value, y: Value, z: Value, line: int) -> None:CODE
LOWmypyc/irbuild/for_helpers.py376 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.py153def 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.py969 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1030 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1063 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1096 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1128 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1163 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1196 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1226 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1263 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1323 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1358 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1393 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1424 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1484 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1551 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1588 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1614 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1646 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1680 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1709 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1737 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1767 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1797 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1832 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1884 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/ir/ops.py1928 def set_sources(self, new: list[Value]) -> None:CODE
LOWmypyc/codegen/emit.py368 def set_undefined_value(self, target: str, rtype: RType) -> None:CODE
LOWmypyc/codegen/emitwrapper.py885 def set_target(self, fn: FuncIR) -> None:CODE
LOWmypy/fastparse.py586 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.py325 # Check if child is nested within fdef (possibly indirectlyCOMMENT
LOWmypyc/irbuild/statement.py1025 # Check if we have a return valueCOMMENT
LOWmypyc/irbuild/statement.py1042 # Check if we need to reraise the original exception from sys.exc_infoCOMMENT
LOWmypyc/irbuild/statement.py1046 # Check if exc_type is NoneCOMMENT
LOWmypyc/irbuild/statement.py1082 # Check if we're in an async function with a finally block that contains awaitCOMMENT
LOWmypyc/irbuild/classdef.py649 # Check if the metaclass defines a __prepare__ method, and if so, call it.COMMENT
LOWmypyc/irbuild/specialize.py289 # Check if there's a specializer for this dunder method and typeCOMMENT
LOWmypyc/irbuild/specialize.py911 # Return the resultCOMMENT
LOWmypyc/irbuild/specialize.py1527 # Check if the adjusted index is in valid rangeCOMMENT
LOWmypyc/irbuild/specialize.py1587 # 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.py124# Check if the current exception is a StopIteration and return its value if so.COMMENT
LOWmypy/fastparse.py676 # Check if stmts are reachable and add them to current_overload,COMMENT
LOWmypy/build.py2091 # Check if plugins are still the same.COMMENT
LOWmypy/expandtype.py263 # 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.py1248 # Check if original variable type has type variables. For example:COMMENT
LOWmypy/ipc.py96 # Check if we already have a message in the buffer beforeCOMMENT
LOWmypy/ipc.py134 # 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.py1407 # Check if this is a super() call - if so, convert to SuperExprCOMMENT
LOWmypy/nativeparse.py2064 # Check if stmts are reachable and add them to current_overload,COMMENT
LOWmypy/stubgenc.py330 # Check if the argument has a default valueCOMMENT
LOWmypy/semanal_main.py516 # Check if the class definition itself triggers a dataclass transform (via a parent class/COMMENT
LOWmypy/constraints.py1637 # 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.py801 # Check if assignment widened the inferred type of a variable; in this case weCOMMENT
LOWmypy/checker.py876 # Check if the setter can accept two positional arguments.COMMENT
LOWmypy/checker.py1686 # Check if __init__ has an invalid return type.COMMENT
LOWmypy/checker.py2545 # Check if this override is covariant.COMMENT
LOWmypy/checker.py3555 # Check if the nearest common ancestor frame for the definition siteCOMMENT
LOWmypy/checker.py3735 # Check if we are a class variable with at least one base classCOMMENT
LOW⚡mypy/semanal.py4030 # Check if there is a definition in supertype. If yes, we can't safelyCOMMENT
LOWmypy/semanal.py2244 # 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.py87 # Check if we should skip function bodies (when ignoring errors)COMMENT
LOWmypy/test/helpers.py192 # 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 · 44 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.py706 print(f"Error calling the plugin(version) entry point of {plugin_path}\n", file=stdout)CODE
MEDIUMmypy/build.py724 print(f"Error constructing plugin instance of {plugin_type.__name__}\n", file=stdout)CODE
MEDIUMmypy/build.py3646 print(f"Error serializing {self.id}", file=self.manager.stdout)CODE
LOWmypy/build.py311 except Exception as exc:CODE
LOWmypy/build.py689 except Exception as exc:CODE
LOWmypy/build.py705 except Exception:CODE
LOWmypy/build.py723 except Exception:CODE
LOWmypy/build.py1754 except Exception as e:CODE
LOWmypy/build.py3097 except Exception as err:CODE
LOWmypy/build.py3645 except Exception:CODE
LOWmypy/moduleinspect.py65 except Exception:CODE
LOWmypy/ipc.py384 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.py1347 except Exception as e:CODE
LOWmypy/stubutil.py149 except Exception as e:CODE
LOWmypy/checkexpr.py6281 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.py783 except Exception as err:CODE
LOWmypy/semanal.py7821 except Exception as err:CODE
LOW⚡mypy/stubtest.py1493 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.py716 except Exception:CODE
LOWmypy/stubtest.py890 except Exception:CODE
LOWmypy/stubtest.py1966 except Exception:CODE
LOWmypy/stubtest.py2004 except Exception:CODE
LOWmypy/stubtest.py2031 except Exception:CODE
LOWmypy/build_worker/worker.py127 except Exception as exc:CODE
MEDIUMmypy/build_worker/worker.py128 print(f"Error writing status file {status_file}:", exc)CODE
MEDIUMmypy/build_worker/worker.py147 print("Error communicating with coordinator:", exc)CODE
LOWmypy/build_worker/worker.py148 except Exception as exc:CODE
LOWmypy/dmypy/client.py275 except Exception:CODE
LOWmypy/test/data.py344 except Exception:CODE
Structural Annotation Overuse22 hits · 34 pts
SeverityFileLineSnippetContext
LOW⚡mypy/typeops.py638 # Step 1: expand all nested unionsCOMMENT
LOW⚡mypy/typeops.py641 # Step 2: fast path for single itemCOMMENT
LOW⚡mypy/typeops.py645 # Step 3: remove redundant unionsCOMMENT
LOW⚡mypy/typeops.py648 # Step 4: If more than one literal exists in the union, try to simplifyCOMMENT
LOWmypy/typeops.py661 # Step 5: At last, we erase any (inconsistent) extra attributes on instances.COMMENT
LOW⚡mypy/checkexpr.py2870 # Step 1: Filter call targets to remove ones where the argument counts don't matchCOMMENT
LOW⚡mypy/checkexpr.py2875 # Step 2: If the arguments contain a union, we try performing union math first,COMMENT
LOW⚡mypy/checkexpr.py3228 # Step 1: If we are already too deep, then stop immediately. Otherwise mypy mightCOMMENT
LOW⚡mypy/checkexpr.py3234 # Step 2: Find position of the first union in arguments. Return the normal inferredCOMMENT
LOWmypy/checkexpr.py2920 # Step 3: We try checking each branch one-by-one.COMMENT
LOWmypy/checkexpr.py2953 # Step 4: Failure. At this point, we know there is no match. We fall back to tryingCOMMENT
LOWmypy/checkexpr.py2966 # Step 5: We try and infer a second-best alternative if possible. If not, fall backCOMMENT
LOWmypy/checkexpr.py3256 # Step 3: Try a direct match before splitting to avoid unnecessary union splitsCOMMENT
LOWmypy/checkexpr.py3276 # Step 4: Split the first remaining union type in arguments into items andCOMMENT
LOWmypy/checkexpr.py3302 # Step 5: If splitting succeeded, then filter out duplicate items before returning.COMMENT
LOWmypy/checkexpr.py4325 # Step 1: We first try leaving the right arguments alone and destructureCOMMENT
LOWmypy/checkexpr.py4349 # 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
LOW⚡mypy/checker.py6853 # Step 1: Obtain the types of each operand and whether or not we canCOMMENT
LOWmypy/checker.py6887 # Step 2: Group operands chained by either the 'is' or '==' operandsCOMMENT
LOWmypy/checker.py6907 # Step 3: Analyze each group and infer more precise type maps for eachCOMMENT
Verbosity Indicators20 hits · 32 pts
SeverityFileLineSnippetContext
LOW⚡mypy/typeops.py638 # Step 1: expand all nested unionsCOMMENT
LOW⚡mypy/typeops.py641 # Step 2: fast path for single itemCOMMENT
LOW⚡mypy/typeops.py645 # Step 3: remove redundant unionsCOMMENT
LOW⚡mypy/typeops.py648 # Step 4: If more than one literal exists in the union, try to simplifyCOMMENT
LOWmypy/typeops.py661 # Step 5: At last, we erase any (inconsistent) extra attributes on instances.COMMENT
LOW⚡mypy/checkexpr.py2870 # Step 1: Filter call targets to remove ones where the argument counts don't matchCOMMENT
LOW⚡mypy/checkexpr.py2875 # Step 2: If the arguments contain a union, we try performing union math first,COMMENT
LOW⚡mypy/checkexpr.py3228 # Step 1: If we are already too deep, then stop immediately. Otherwise mypy mightCOMMENT
LOW⚡mypy/checkexpr.py3234 # Step 2: Find position of the first union in arguments. Return the normal inferredCOMMENT
LOWmypy/checkexpr.py2920 # Step 3: We try checking each branch one-by-one.COMMENT
LOWmypy/checkexpr.py2953 # Step 4: Failure. At this point, we know there is no match. We fall back to tryingCOMMENT
LOWmypy/checkexpr.py2966 # Step 5: We try and infer a second-best alternative if possible. If not, fall backCOMMENT
LOWmypy/checkexpr.py3256 # Step 3: Try a direct match before splitting to avoid unnecessary union splitsCOMMENT
LOWmypy/checkexpr.py3276 # Step 4: Split the first remaining union type in arguments into items andCOMMENT
LOWmypy/checkexpr.py3302 # Step 5: If splitting succeeded, then filter out duplicate items before returning.COMMENT
LOWmypy/checkexpr.py4325 # Step 1: We first try leaving the right arguments alone and destructureCOMMENT
LOWmypy/checkexpr.py4349 # Step 2: If that fails, we try again but also destructure the right argument.COMMENT
LOW⚡mypy/checker.py6853 # Step 1: Obtain the types of each operand and whether or not we canCOMMENT
LOWmypy/checker.py6887 # Step 2: Group operands chained by either the 'is' or '==' operandsCOMMENT
LOWmypy/checker.py6907 # Step 3: Analyze each group and infer more precise type maps for eachCOMMENT
Decorative Section Separators10 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMmypy/main.py425 # =====================COMMENT
MEDIUMmypy/main.py427 # =====================COMMENT
MEDIUMmypy/main.py444 # ===============COMMENT
MEDIUMmypy/main.py446 # ===============COMMENT
MEDIUMmypy/stubtest.py213# ====================COMMENT
MEDIUMmypy/stubtest.py215# ====================COMMENT
MEDIUMmypy/stubtest.py1763# ====================COMMENT
MEDIUMmypy/stubtest.py1765# ====================COMMENT
MEDIUMmypy/stubtest.py2241# ====================COMMENT
MEDIUMmypy/stubtest.py2243# ====================COMMENT
AI Structural Patterns31 hits · 26 pts
SeverityFileLineSnippetContext
LOWmisc/analyze_cache.py118CODE
LOWmypyc/build.py904CODE
LOWmypyc/options.py7CODE
LOWmypyc/irbuild/context.py15CODE
LOWmypyc/irbuild/specialize.py1547CODE
LOWmypyc/ir/func_ir.py145CODE
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.py2175CODE
LOWmypy/stubgen.py1720CODE
LOWmypy/checkmember.py174CODE
LOWmypy/checkmember.py88CODE
LOWmypy/exportjson.py272CODE
LOWmypy/types.py2293CODE
LOWmypy/types.py2353CODE
LOWmypy/join.py920CODE
LOWmypy/typeanal.py204CODE
LOWmypy/gclogger.py48CODE
LOWmypy/errors.py594CODE
LOWmypy/nodes.py4265CODE
LOWmypy/main.py1429CODE
LOWmypy/semanal_shared.py187CODE
LOWmypy/semanal.py7824CODE
LOWmypy/semanal.py7879CODE
LOWmypy/semanal.py7928CODE
LOWmypy/subtypes.py97CODE
LOWmypy/test/helpers.py527CODE
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.py343 # In this example we add <Super[wildcard]> -> <Sub>, to invalidate Sub ifCOMMENT
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippetContext
LOWmypyc/irbuild/env_class.py141 # If this is a FuncDef, then make sure to load the FuncDef into its own environmentCOMMENT
LOWmypy/types.py83# 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.py638 def helper(defs: list[Statement]) -> None:CODE
TODO Padding2 hits · 2 pts
SeverityFileLineSnippetContext
LOWmypy/checkexpr.py6264 # TODO: consider using cache for more expression kinds.COMMENT
LOWmypy/server/deps.py201 # TODO: Add tests for this function.COMMENT