Optional static typing for Python
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 30 | def is_list_of_setuptools_extension(items: list[Any]) -> TypeGuard[list[Extension]]: | CODE |
| LOW | misc/incremental_checker.py | 86 | def ensure_environment_is_ready(mypy_path: str, temp_repo_path: str, mypy_cache_path: str) -> None: | CODE |
| LOW | misc/generate_changelog.py | 12 | def find_all_release_branches() -> list[tuple[int, int]]: | CODE |
| LOW | misc/generate_changelog.py | 108 | def filter_out_commits_from_old_release_branch( | CODE |
| LOW | misc/generate_changelog.py | 126 | def find_changes_between_releases(old_branch: str, new_branch: str) -> list[CommitInfo]: | CODE |
| LOW | misc/upload-pypi.py | 56 | def download_all_release_assets(release: dict[str, Any], dst: Path) -> None: | CODE |
| LOW | misc/sync-typeshed.py | 90 | def create_or_update_pull_request(*, title: str, body: str, branch_name: str) -> None: | CODE |
| LOW | mypyc/build.py | 260 | def generate_c_extension_shim( | CODE |
| LOW | mypyc/build.py | 470 | def _patch_setuptools_copy_extensions_to_source() -> None: | CODE |
| LOW | mypyc/annotate.py | 275 | def visit_dictionary_comprehension(self, o: DictionaryComprehension, /) -> None: | CODE |
| LOW | mypyc/namegen.py | 104 | def make_module_translation_map(names: list[str]) -> dict[str, str]: | CODE |
| LOW | mypyc/irbuild/vec.py | 282 | def vec_check_and_adjust_index( | CODE |
| LOW | mypyc/irbuild/vec.py | 345 | def vec_get_item_unsafe_lower( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 572 | def coerce_int_to_fixed_width(self, src: Value, target_type: RType, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 667 | def coerce_tagged_to_fixed_width_with_range_check( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 718 | def emit_fixed_width_overflow_error(self, target_type: RType, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 730 | def coerce_short_int_to_fixed_width(self, src: Value, target_type: RType, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 757 | def coerce_fixed_width_to_int(self, src: Value, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 1374 | def native_args_to_positional( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 1917 | def translate_instance_contains(self, inst: Value, item: Value, op: str, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 1940 | def _non_specialized_unary_op(self, value: Value, op: str, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2702 | def inline_fixed_width_divide(self, type: RType, lhs: Value, rhs: Value, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2836 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2906 | def translate_special_method_call( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2934 | def _translate_special_low_level_method_call( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 3016 | def _translate_fast_optional_eq_cmp( | CODE |
| LOW | mypyc/irbuild/util.py | 240 | def get_explicit_native_class(path: str, cdef: ClassDef, errors: Errors) -> bool | None: | CODE |
| LOW | mypyc/irbuild/util.py | 271 | def is_implicit_extension_class(cdef: ClassDef) -> tuple[bool, str]: | CODE |
| LOW | mypyc/irbuild/mapper.py | 243 | def is_native_module_ref_expr(self, expr: RefExpr) -> bool: | CODE |
| LOW | mypyc/irbuild/prebuildvisitor.py | 36 | def _comprehension_has_lambda(node: GeneratorExpr | DictionaryComprehension) -> bool: | CODE |
| LOW | mypyc/irbuild/prebuildvisitor.py | 200 | def _visit_comprehension_with_scope(self, o: GeneratorExpr | DictionaryComprehension) -> None: | CODE |
| LOW | mypyc/irbuild/prebuildvisitor.py | 243 | def visit_dictionary_comprehension(self, o: DictionaryComprehension) -> None: | CODE |
| LOW | mypyc/irbuild/env_class.py | 277 | def setup_func_for_recursive_call( | CODE |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 135 | def convert_format_expr_to_str( | CODE |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 211 | def convert_format_expr_to_bytes( | CODE |
| LOW | mypyc/irbuild/statement.py | 166 | def transform_expression_stmt(builder: IRBuilder, stmt: ExpressionStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 192 | def check_unsupported_cls_assignment(builder: IRBuilder, stmt: AssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 224 | def transform_assignment_stmt(builder: IRBuilder, stmt: AssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 300 | def transform_operator_assignment_stmt(builder: IRBuilder, stmt: OperatorAssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 325 | def import_globals_id_and_name(module_id: str, as_name: str | None) -> tuple[str, str]: | CODE |
| LOW | mypyc/irbuild/statement.py | 386 | def split_import_group_to_python_and_native( | CODE |
| LOW | mypyc/irbuild/statement.py | 413 | def transform_imports_without_grouping( | CODE |
| LOW | mypyc/irbuild/statement.py | 429 | def transform_non_native_import_group( | CODE |
| LOW | mypyc/irbuild/statement.py | 540 | def transform_import_from_buckets( | CODE |
| LOW | mypyc/irbuild/statement.py | 769 | def transform_try_except_stmt(builder: IRBuilder, t: TryStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 857 | def try_finally_resolve_control( | CODE |
| LOW | mypyc/irbuild/statement.py | 907 | def transform_try_finally_stmt( | CODE |
| LOW | mypyc/irbuild/statement.py | 944 | def transform_try_finally_stmt_async( | CODE |
| LOW | mypyc/irbuild/statement.py | 1468 | def transform_yield_from_expr(builder: IRBuilder, o: YieldFromExpr) -> Value: | CODE |
| LOW | mypyc/irbuild/statement.py | 1480 | def transform_type_alias_stmt(builder: IRBuilder, s: TypeAliasStmt) -> None: | CODE |
| LOW | mypyc/irbuild/constant_fold.py | 80 | def constant_fold_binary_op_extended( | CODE |
| LOW | mypyc/irbuild/ast_helpers.py | 56 | def maybe_process_conditional_comparison( | CODE |
| LOW | mypyc/irbuild/builder.py | 400 | def load_bytes_from_str_literal(self, value: str, line: int = -1) -> Value: | CODE |
| LOW | mypyc/irbuild/builder.py | 505 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 633 | def maybe_add_implicit_return(self) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 651 | def disallow_class_assignments(self, lvalues: list[Lvalue], line: int) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 921 | def process_sequence_assignment( | CODE |
| LOW | mypyc/irbuild/builder.py | 954 | def process_iterator_tuple_assignment_helper( | CODE |
| LOW | mypyc/irbuild/builder.py | 969 | def process_iterator_tuple_assignment( | CODE |
| LOW | mypyc/irbuild/builder.py | 1100 | def get_sequence_type_from_type(self, target_type: Type) -> RType: | CODE |
| 1162 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/apply-cache-diff.py | 34 | CODE | |
| LOW | misc/diff-cache.py | 154 | CODE | |
| LOW | misc/gen_blog_post_html.py | 40 | CODE | |
| LOW | mypyc/build.py | 632 | CODE | |
| LOW | mypyc/build.py | 691 | CODE | |
| LOW | mypyc/build.py | 785 | CODE | |
| LOW | mypyc/build.py | 875 | CODE | |
| LOW | mypyc/subtype.py | 27 | CODE | |
| LOW | mypyc/subtype.py | 65 | CODE | |
| LOW | mypyc/annotate.py | 182 | CODE | |
| LOW | mypyc/annotate.py | 299 | CODE | |
| LOW | mypyc/annotate.py | 315 | CODE | |
| LOW | mypyc/annotate.py | 359 | CODE | |
| LOW | mypyc/rt_expandtype.py | 15 | CODE | |
| LOW | mypyc/build_setup.py | 35 | CODE | |
| LOW | mypyc/sametype.py | 57 | CODE | |
| LOW | mypyc/irbuild/vec.py | 210 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 465 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 969 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 1374 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 1639 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2023 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2063 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2206 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2378 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2496 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2634 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2752 | CODE | |
| LOW | mypyc/irbuild/util.py | 72 | CODE | |
| LOW | mypyc/irbuild/util.py | 154 | CODE | |
| LOW | mypyc/irbuild/util.py | 182 | CODE | |
| LOW | mypyc/irbuild/util.py | 240 | CODE | |
| LOW | mypyc/irbuild/mapper.py | 73 | CODE | |
| LOW | mypyc/irbuild/prebuildvisitor.py | 148 | CODE | |
| LOW | mypyc/irbuild/env_class.py | 236 | CODE | |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 48 | CODE | |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 135 | CODE | |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 211 | CODE | |
| LOW | mypyc/irbuild/statement.py | 540 | CODE | |
| LOW | mypyc/irbuild/statement.py | 1267 | CODE | |
| LOW | mypyc/irbuild/constant_fold.py | 39 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1728 | CODE | |
| LOW | mypyc/irbuild/builder.py | 724 | CODE | |
| LOW | mypyc/irbuild/builder.py | 746 | CODE | |
| LOW | mypyc/irbuild/builder.py | 864 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1100 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1346 | CODE | |
| LOW | mypyc/irbuild/classdef.py | 89 | CODE | |
| LOW | mypyc/irbuild/classdef.py | 564 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 720 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 809 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 872 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 940 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 992 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1053 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1073 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1097 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1307 | CODE | |
| LOW | mypyc/irbuild/main.py | 58 | CODE | |
| LOW | mypyc/irbuild/for_helpers.py | 481 | CODE | |
| 591 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test-requirements.txt | 1 | # | COMMENT |
| LOW | test-requirements.txt | 21 | # -r test-requirements.in | COMMENT |
| LOW | test-requirements.txt | 41 | # via | COMMENT |
| LOW | misc/find_type.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | misc/docker/run.sh | 1 | #!/bin/bash | COMMENT |
| LOW | mypyc/options.py | 41 | # even when its return type is just `bool`. | COMMENT |
| LOW | mypyc/options.py | 61 | # experimental mode (e.g. use _experimental suffix in librt run test). | COMMENT |
| LOW | mypyc/common.py | 61 | MAX_LITERAL_SHORT_INT: Final = MAX_SHORT_INT | COMMENT |
| LOW | mypyc/irbuild/statement.py | 341 | return globals_id, globals_name | COMMENT |
| LOW | mypyc/irbuild/statement.py | 981 | builder.activate_block(err_handler) | COMMENT |
| LOW | mypyc/irbuild/callable_class.py | 221 | # - A nested function: the callable class is instantiated | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 161 | # function. Specializers can return None to indicate that they failed | COMMENT |
| LOW | mypyc/irbuild/function.py | 921 | # typ.fullname contains the module where the class object was defined. However, it is possible | COMMENT |
| LOW | mypyc/lib-rt/dict_ops.c | 1 | // Dict primitive operations | COMMENT |
| LOW | mypyc/lib-rt/misc_ops.c | 1 | #include "pythoncapi_compat.h" | COMMENT |
| LOW | mypyc/lib-rt/misc_ops.c | 1281 | Py_DECREF(file); | COMMENT |
| LOW | mypyc/lib-rt/CPy.h | 1 | // Mypyc C API | COMMENT |
| LOW | mypyc/lib-rt/CPy.h | 21 | COMMENT | |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 1 | // Header file providing new C API functions to old Python versions. | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 21 | #include <Python.h> | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 41 | # else | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 101 | COMMENT | |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 121 | # define Py_IsTrue(x) Py_Is(x, Py_True) | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 541 | return Py_NewRef(code->co_cellvars); | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 1201 | COMMENT | |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 1221 | COMMENT | |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 1921 | Py_DECREF(obj); | COMMENT |
| LOW | mypyc/lib-rt/pythoncapi_compat.h | 1941 | # define Py_T_USHORT 10 | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.c | 1 | // Collects code that was copied in from cpython, for a couple of different reasons: | COMMENT |
| LOW | mypyc/lib-rt/str_extra_ops.c | 1 | #include "str_extra_ops.h" | COMMENT |
| LOW | mypyc/lib-rt/stringwriter_extra_ops.c | 1 | // Primitives related to librt.strings.StringWriter that get linked statically | COMMENT |
| LOW | mypyc/lib-rt/str_ops.c | 1 | #include "pythoncapi_compat.h" | COMMENT |
| LOW | mypyc/lib-rt/getargs.c | 21 | * programmatically and can be assumed valid. | COMMENT |
| LOW | mypyc/lib-rt/getargs.c | 41 | #else | COMMENT |
| LOW | mypyc/lib-rt/vecs_extra_ops.c | 1 | // Primitives related to librt.vecs that get linked statically | COMMENT |
| LOW | mypyc/lib-rt/generic_ops.c | 1 | // Generic primitive operations | COMMENT |
| LOW | mypyc/lib-rt/bytearray_extra_ops.h | 1 | #ifndef MYPYC_BYTEARRAY_EXTRA_OPS_H | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 1 | // Collects code that was copied in from cpython, for a couple of different reasons: | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 21 | #include "internal/pycore_genobject.h" // _PyGen_FetchStopIterationValue | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 41 | #ifdef Py_GIL_DISABLED | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 81 | // _Py_NewRefWithLock fallback are unnecessary here -- a plain load + Py_INCREF is | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 101 | // reference after this store. The old value must therefore stay alive until every | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 121 | _PyObject_XDecRefDelayed(op); | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 141 | // (it would let that first cross-thread reader succeed on the cheaper | COMMENT |
| LOW | mypyc/lib-rt/int_ops.c | 1 | // Int primitive operations (tagged arbitrary-precision integers) | COMMENT |
| LOW | mypyc/lib-rt/int_ops.c | 21 | COMMENT | |
| LOW | mypyc/lib-rt/getargsfast.c | 21 | // The kwtuple field doubles as the "parser has been initialized" flag: it is | COMMENT |
| LOW | mypyc/lib-rt/exc_ops.c | 201 | // to the internal C API: to the pycore_frame.h header file. | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 1 | #ifndef MYPYC_UTIL_H | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 21 | #define CPy_NOINLINE __declspec(noinline) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 41 | // 3. GNU thread local storage for GCC/Clang targets that still need it | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 61 | #define CPY_UNROLL_LOOP(n) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 101 | COMMENT | |
| LOW | mypyc/lib-rt/mypyc_util.h | 161 | } | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 181 | #define CPY_LONG_IS_NEGATIVE(o) (((o)->long_value.lv_tag & CPY_SIGN_MASK) == CPY_SIGN_NEGATIVE) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 201 | // Are we targeting Python 3.14 or newer? | COMMENT |
| LOW | mypyc/lib-rt/strings/librt_strings.c | 1 | #include "pythoncapi_compat.h" | COMMENT |
| LOW | mypyc/lib-rt/strings/librt_strings_common.h | 1 | #ifndef LIBRT_STRINGS_COMMON_H | COMMENT |
| LOW | mypyc/lib-rt/strings/librt_strings.h | 1 | #ifndef LIBRT_STRINGS_H | COMMENT |
| LOW | mypyc/lib-rt/strings/librt_strings_api.h | 1 | #ifndef LIBRT_STRINGS_API_H | COMMENT |
| 494 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 1 | CODE | |
| LOW | setup.py | 3 | CODE | |
| LOW | runtests.py | 3 | CODE | |
| LOW | misc/cherry-pick-typeshed.py | 8 | CODE | |
| LOW | misc/profile_check.py | 28 | CODE | |
| LOW | misc/incremental_checker.py | 34 | CODE | |
| LOW | misc/dump-ast.py | 6 | CODE | |
| LOW | misc/generate_changelog.py | 3 | CODE | |
| LOW | misc/apply-cache-diff.py | 10 | CODE | |
| LOW | misc/analyze_cache.py | 3 | CODE | |
| LOW | misc/upload-pypi.py | 8 | CODE | |
| LOW | misc/convert-cache.py | 8 | CODE | |
| LOW | misc/sync-typeshed.py | 10 | CODE | |
| LOW | misc/perf_compare.py | 20 | CODE | |
| LOW | misc/log_trace_check.py | 10 | CODE | |
| LOW | misc/perf_checker.py | 3 | CODE | |
| LOW | misc/diff-cache.py | 8 | CODE | |
| LOW | misc/find_type.py | 26 | CODE | |
| LOW | mypyc/build.py | 21 | CODE | |
| LOW | mypyc/build.py | 31 | CODE | |
| LOW | mypyc/subtype.py | 3 | CODE | |
| LOW | mypyc/options.py | 1 | CODE | |
| LOW | mypyc/crash.py | 1 | CODE | |
| LOW | mypyc/common.py | 1 | CODE | |
| LOW | mypyc/build_setup.py | 11 | CODE | |
| LOW | mypyc/errors.py | 1 | CODE | |
| LOW | mypyc/sametype.py | 3 | CODE | |
| LOW | mypyc/namegen.py | 1 | CODE | |
| LOW | mypyc/rt_subtype.py | 16 | CODE | |
| LOW | mypyc/__main__.py | 13 | CODE | |
| LOW | mypyc/irbuild/vec.py | 3 | CODE | |
| LOW | mypyc/irbuild/targets.py | 1 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 7 | CODE | |
| LOW | mypyc/irbuild/util.py | 3 | CODE | |
| LOW | mypyc/irbuild/vtable.py | 3 | CODE | |
| LOW | mypyc/irbuild/mapper.py | 3 | CODE | |
| LOW | mypyc/irbuild/prebuildvisitor.py | 1 | CODE | |
| LOW | mypyc/irbuild/env_class.py | 18 | CODE | |
| LOW | mypyc/irbuild/format_str_tokenizer.py | 3 | CODE | |
| LOW | mypyc/irbuild/statement.py | 9 | CODE | |
| LOW | mypyc/irbuild/constant_fold.py | 11 | CODE | |
| LOW | mypyc/irbuild/ast_helpers.py | 7 | CODE | |
| LOW | mypyc/irbuild/builder.py | 6 | CODE | |
| LOW | mypyc/irbuild/classdef.py | 3 | CODE | |
| LOW | mypyc/irbuild/generator.py | 11 | CODE | |
| LOW | mypyc/irbuild/missingtypevisitor.py | 1 | CODE | |
| LOW | mypyc/irbuild/visitor.py | 6 | CODE | |
| LOW | mypyc/irbuild/context.py | 3 | CODE | |
| LOW | mypyc/irbuild/nonlocalcontrol.py | 6 | CODE | |
| LOW | mypyc/irbuild/callable_class.py | 7 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 15 | CODE | |
| LOW | mypyc/irbuild/main.py | 23 | CODE | |
| LOW | mypyc/irbuild/for_helpers.py | 8 | CODE | |
| LOW | mypyc/irbuild/expression.py | 7 | CODE | |
| LOW | mypyc/irbuild/prepare.py | 14 | CODE | |
| LOW | mypyc/irbuild/function.py | 13 | CODE | |
| LOW | mypyc/irbuild/match.py | 1 | CODE | |
| LOW | mypyc/lib-rt/setup.py | 6 | CODE | |
| LOW | mypyc/lib-rt/setup.py | 17 | CODE | |
| LOW | mypyc/lib-rt/build_setup.py | 11 | CODE | |
| 315 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mypyc/irbuild/ll_builder.py | 1850 | ComparisonOp(check_error_result, null, ComparisonOp.NEQ, line) | CODE |
| HIGH | mypyc/irbuild/ll_builder.py | 991 | null, don't put it in the dict. | STRING |
| HIGH | mypyc/irbuild/function.py | 412 | ComparisonOp(generic_getattr_result, null, ComparisonOp.NEQ, line) | CODE |
| HIGH | mypyc/irbuild/function.py | 455 | is_delattr = builder.add(ComparisonOp(value_arg, null, ComparisonOp.EQ, line)) | CODE |
| HIGH | mypyc/irbuild/function.py | 470 | builder.call_c(generic_setattr, [builder.self(), attr_arg, null], line) | CODE |
| HIGH | mypyc/analysis/attrdefined.py | 209 | # If an attribute we *read* may be undefined, it isn't always defined. | COMMENT |
| HIGH | mypyc/ir/rtypes.py | 83 | # undefined, we can't just rely on the error value to signal this. | COMMENT |
| HIGH | mypyc/codegen/emitmodule.py | 1562 | return f"{emitter.ctype_spaced(typ)}{static_name} = {undefined};" | CODE |
| HIGH | mypyc/codegen/emitfunc.py | 412 | atomically and returns a new reference (or NULL if undefined), so callers must | STRING |
| HIGH | mypyc/codegen/emitfunc.py | 524 | # undefined, which is precisely the error value here, so the "NULL without | COMMENT |
| HIGH | mypyc/codegen/emitfunc.py | 596 | # previously undefined), so decref the old value. | COMMENT |
| HIGH | mypyc/codegen/emit.py | 1090 | self.emit_lines(f"if ({dest} == -1.0 && PyErr_Occurred()) {{", failure, "}") | CODE |
| HIGH | mypyc/transform/spill.py | 100 | block.ops.extend([null, SetAttr(env_reg, spill_locs[op.src], null, op.line)]) | CODE |
| HIGH | mypyc/transform/refcount.py | 197 | # null). | COMMENT |
| HIGH | mypy/meet.py | 771 | n = r.length() if isinstance(r, TupleType) else 1 | CODE |
| HIGH | mypy/meet.py | 1018 | if s.length() == t.length(): | CODE |
| HIGH | mypy/meet.py | 1020 | for i in range(t.length()): | CODE |
| HIGH | mypy/meet.py | 1031 | if s.length() == t.length() and s_unpack_index == t_unpack_index: | CODE |
| HIGH | mypy/meet.py | 1067 | if fixed.length() < variadic.length() - 1: | CODE |
| HIGH | mypy/meet.py | 1070 | suffix_len = variadic.length() - prefix_len - 1 | CODE |
| HIGH⚡ | mypy/types.py | 2849 | return self.length() > 0 | CODE |
| HIGH⚡ | mypy/types.py | 2856 | if self.length() == 0: | CODE |
| HIGH⚡ | mypy/types.py | 2858 | if self.length() > 1: | CODE |
| HIGH | mypy/join.py | 481 | if s.length() == t.length(): | CODE |
| HIGH | mypy/join.py | 483 | for i in range(t.length()): | CODE |
| HIGH | mypy/join.py | 495 | if s.length() == t.length() and s_unpack_index == t_unpack_index: | CODE |
| HIGH | mypy/join.py | 500 | suffix_len = t.length() - t_unpack_index - 1 | CODE |
| HIGH | mypy/join.py | 527 | if s.length() == 1 or t.length() == 1: | CODE |
| HIGH | mypy/join.py | 559 | if fixed.length() < variadic.length() - 1: | CODE |
| HIGH | mypy/join.py | 563 | suffix_len = variadic.length() - prefix_len - 1 | CODE |
| HIGH | mypy/partially_defined.py | 272 | """If name has previously been reported as undefined, the NameExpr that was called will be returned.""" | STRING |
| HIGH⚡ | mypy/checkexpr.py | 4648 | return left.length() | CODE |
| HIGH⚡ | mypy/checkexpr.py | 4652 | return left.length() - 1 + unpack.type.min_len | CODE |
| HIGH⚡ | mypy/checkexpr.py | 4653 | return left.length() - 1 | CODE |
| HIGH | mypy/checkexpr.py | 4679 | extra_items = self.min_tuple_length(left) - left.length() + 1 | CODE |
| HIGH⚡ | mypy/checker.py | 7592 | if method(typ.length(), size): | CODE |
| HIGH⚡ | mypy/checker.py | 7602 | min_len = typ.length() - 1 + unpacked.min_len | CODE |
| HIGH⚡ | mypy/checker.py | 7614 | unpack = UnpackType(unpacked.copy_modified(min_len=size - typ.length() + 1)) | CODE |
| HIGH⚡ | mypy/checker.py | 7623 | min_len = typ.length() - 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | misc/sync-typeshed.py | 188 | # Create a commit | COMMENT |
| MEDIUM | mypyc/build.py | 986 | # Create a compiler object so we can make decisions based on what | COMMENT |
| MEDIUM | mypyc/irbuild/vec.py | 113 | # Create an integer which will hold the type object * as an integral value. | COMMENT |
| MEDIUM | mypyc/irbuild/vec.py | 412 | # Create an integer which will hold the type object * as an integral value. | COMMENT |
| MEDIUM | mypyc/irbuild/ll_builder.py | 1255 | # Create a C array containing all arguments as boxed values. | COMMENT |
| MEDIUM | mypyc/irbuild/statement.py | 1304 | # Create a new block for the instructions immediately following the yield expression, and | COMMENT |
| MEDIUM | mypyc/irbuild/classdef.py | 484 | # Create the class | COMMENT |
| MEDIUM | mypyc/irbuild/generator.py | 424 | # Define a variable representing the label to go to the next time | COMMENT |
| MEDIUM | mypyc/irbuild/callable_class.py | 64 | # Define the actual callable class ClassIR, and set its | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 662 | # Create a new block to handle cleanup after loop exit. | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 702 | # Create a new cleanup block for when the loop is finished. | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 751 | # Create a new cleanup block for when the loop is finished. | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 1196 | # Create a register to store the state of the loop index and | COMMENT |
| MEDIUM | mypyc/test/test_serialization.py | 3 | # This file is named test_serialization.py even though it doesn't | COMMENT |
| MEDIUM | mypyc/codegen/literals.py | 122 | # The following methods return the C encodings of literal values | COMMENT |
| MEDIUM | mypyc/codegen/emitwrapper.py | 160 | # Define the arguments the function accepts (but no types yet) | COMMENT |
| MEDIUM | mypyc/primitives/misc_ops.py | 260 | # Create a heap type based on a template non-heap type. | COMMENT |
| MEDIUM | mypyc/primitives/misc_ops.py | 278 | # Create a dataclass from an extension class. See | COMMENT |
| MEDIUM | docs/source/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| MEDIUM | mypy/build.py | 1898 | # This file is a cache directory tag automatically created by mypy. | COMMENT |
| MEDIUM | mypy/stubgen.py | 2028 | # Create the output folder if it doesn't already exist. | STRING |
| MEDIUM | mypy/treetransform.py | 477 | # This method is used when the transform result must be a NameExpr. | COMMENT |
| MEDIUM | mypy/semanal_newtype.py | 89 | # Create the corresponding class definition if the aliased type is subtypeable | COMMENT |
| MEDIUM | mypy/typeanal.py | 971 | # Create a named TypedDictType | COMMENT |
| MEDIUM | mypy/typeops.py | 397 | # Create the type of self in subtype, of form t[a1, ...]. | COMMENT |
| MEDIUM | mypy/applytype.py | 109 | # Create a map from type variable id to target type. | COMMENT |
| MEDIUM | mypy/nodes.py | 4633 | # Create an Instance similar to fill_typevars(). | COMMENT |
| MEDIUM | mypy/nodes.py | 4655 | # Create an Instance similar to fill_typevars(). | COMMENT |
| MEDIUM | mypy/typestate.py | 30 | """This class provides subtype caching to improve performance of subtype checks. | STRING |
| MEDIUM⚡ | mypy/checker.py | 6060 | # Create a dummy subject expression to handle cases where a match statement's subject | COMMENT |
| MEDIUM | mypy/checker.py | 2543 | # This method is a subtype of at least one union variant. | COMMENT |
| MEDIUM | mypy/checker.py | 8651 | # This method is currently only used to decide whether to pair | COMMENT |
| MEDIUM | mypy/plugins/functools.py | 241 | # Create a valid context for various ad-hoc inspections in check_call(). | COMMENT |
| MEDIUM | mypy/plugins/common.py | 292 | # Create the final OverloadedFuncDef node: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mypyc/build.py | 723 | # We let the test harness just pass in the c file contents instead | COMMENT |
| LOW | mypyc/build.py | 723 | # We let the test harness just pass in the c file contents instead | COMMENT |
| LOW | mypyc/irbuild/ll_builder.py | 3005 | # There's no __eq__ defined, so just use object identity. | COMMENT |
| LOW | mypyc/irbuild/callable_class.py | 185 | # If accessed through the class, just return the callable | COMMENT |
| LOW | mypyc/irbuild/function.py | 620 | # If there are no decorators associated with the function, then just return the | COMMENT |
| LOW⚡ | mypyc/irbuild/function.py | 1106 | # the generated C code seems to expect that __init__ returns a char, so just return 1 | COMMENT |
| LOW | mypyc/codegen/emitmodule.py | 161 | # If we aren't doing validity checks, just return the cache data | COMMENT |
| LOW | mypyc/codegen/emitwrapper.py | 963 | # Nothing special needs to done to handle errors, so just return. | COMMENT |
| LOW | mypyc/primitives/int_ops.py | 58 | # Native ints don't have a separate type object -- we just use 'builtins.int'. | COMMENT |
| MEDIUM | …c/external/googletest/include/gtest/gtest-death-test.h | 146 | // This implementation is *not* meant to be as highly tuned or robust | COMMENT |
| MEDIUM | …c/external/googletest/include/gtest/gtest-death-test.h | 218 | // In practice, this can be used to test functions that utilize the | COMMENT |
| LOW | mypy/fastparse.py | 2089 | # RawExpressionType so we just pass in 'None' for now. We'll report the | COMMENT |
| MEDIUM | mypy/build.py | 4610 | # to leverage parallelism as much as possible. | COMMENT |
| LOW | mypy/stubgen.py | 920 | # just use Incomplete as the base class. | COMMENT |
| LOW | mypy/checkmember.py | 1081 | # This is pretty bad, so just return the original signature if | COMMENT |
| MEDIUM | mypy/inspections.py | 552 | # We are using a bit slower but robust way to find a module by path, | COMMENT |
| MEDIUM | mypy/meet.py | 725 | # TODO: write a more robust algorithm for cases where both types are variadic. | COMMENT |
| LOW | mypy/meet.py | 608 | # that came as fallbacks, so simply call is_subtype() to avoid code duplication. | COMMENT |
| LOW | mypy/types.py | 3391 | # some other type, we just return that string repr directly. | COMMENT |
| LOW | mypy/types.py | 4072 | # For bytes literals, the value is already escaped, just add quotes and b prefix | COMMENT |
| LOW | mypy/join.py | 357 | # in join_instances_via_supertype). Otherwise, just return the nominal join. | COMMENT |
| LOW | mypy/types_utils.py | 164 | # Instead of using Tuple[Unpack[Tuple[...]]], just use Tuple[...] | COMMENT |
| LOW | mypy/typeanal.py | 1335 | # fine to just return it as-is. | COMMENT |
| LOW | mypy/typeanal.py | 1837 | # Types that we can just add directly to the literal/potential union of literals. | COMMENT |
| LOW | mypy/typeanal.py | 2885 | # TypeAliasTypes are analyzed separately already, just return it | COMMENT |
| LOW | mypy/typeops.py | 726 | # with the same fallback, we can skip doing that work again and just add the type | COMMENT |
| LOW | mypy/messages.py | 2732 | # No type arguments, just return the type name | COMMENT |
| LOW | mypy/messages.py | 3161 | # For other TypeVarLikeTypes, just use the repr | COMMENT |
| LOW | mypy/messages.py | 1845 | # Nothing special here; just create the note: | STRING |
| LOW | mypy/plugin.py | 446 | # A no-op callback would just return the inferred return type, but a useful | COMMENT |
| LOW | mypy/solve.py | 276 | # ...unless this is the only information we have, then we just pass it on. | COMMENT |
| LOW | mypy/nodes.py | 1307 | # TODO: we want to remove this at some point and just use `FuncBase` ideally. | COMMENT |
| LOW | mypy/checkexpr.py | 2112 | # So we give up and just use function arguments for type inference, with just two | COMMENT |
| LOW | mypy/checkexpr.py | 3086 | # We try returning a precise type if we can. If not, we give up and just return 'Any'. | COMMENT |
| LOW | mypy/checkexpr.py | 3727 | # type of the left operand, as the operation will simply return False if the union's container/iterator | COMMENT |
| LOW | mypy/checkexpr.py | 4668 | # indexing it seems benign to just return the upper bound item, similar | COMMENT |
| MEDIUM⚡ | mypy/checker.py | 7620 | # Homogeneous variadic item is the case where we are most flexible. Essentially, | COMMENT |
| MEDIUM | mypy/semanal.py | 4149 | # TODO: find a more robust way to track the order of definitions. | COMMENT |
| MEDIUM | mypy/semanal.py | 6580 | # TODO: this is not 100% robust for type variables nested within a class | COMMENT |
| LOW | mypy/checkpattern.py | 308 | # into individual items, so we just use its upper bound for the whole | COMMENT |
| MEDIUM | mypy/subtypes.py | 2223 | # TODO: Implement more robust support for runtime isinstance() checks, see issue #3827. | COMMENT |
| LOW | mypy/stubtest.py | 392 | # But we can't just return True here, because symtable doesn't know about symbols | COMMENT |
| LOW | mypy/plugins/enums.py | 221 | # If this is the case, we simply return this type. | COMMENT |
| MEDIUM | mypy/plugins/dataclasses.py | 751 | """Converts all attributes to @property methods in order to | STRING |
| LOW | mypy/server/deps.py | 580 | # dependencies from this so just return something. (The first, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypyc/irbuild/ll_builder.py | 295 | def set_module(self, module_name: str, module_path: str) -> None: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 337 | def set_mem(self, ptr: Value, value_type: RType, value: Value) -> None: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2836 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/util.py | 189 | def set_mypyc_attr(key: str, value: Any, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 319 | def set_module(self, module_name: str, module_path: str) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 505 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/specialize.py | 399 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/specialize.py | 438 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 295 | def set_item(item_index: Value) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 312 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 375 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/analysis/attrdefined.py | 400 | def update_always_defined_attrs_using_subclasses(cl: ClassIR, seen: set[ClassIR]) -> None: | CODE |
| LOW | mypyc/test/testutil.py | 146 | def update_testcase_output(testcase: DataDrivenTestCase, output: list[str]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 299 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 339 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 375 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 392 | def set_target(self, i: int, new: BasicBlock) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 410 | def set_target(self, i: int, new: BasicBlock) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 420 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 474 | def set_target(self, i: int, new: BasicBlock) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 484 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 514 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 549 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 595 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 624 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 653 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 685 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 804 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 843 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 880 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 922 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 965 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1026 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1059 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1092 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1124 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1159 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1192 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1222 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1259 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1319 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1354 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1389 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1420 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1480 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1547 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1584 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1610 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1642 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1676 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1705 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1733 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1763 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1793 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1828 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1880 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1924 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/codegen/emit.py | 362 | def set_undefined_value(self, target: str, rtype: RType) -> None: | CODE |
| LOW | mypyc/codegen/emitwrapper.py | 852 | def set_target(self, fn: FuncIR) -> None: | CODE |
| LOW | mypy/fastparse.py | 584 | def set_block_lines(self, b: Block, stmts: Sequence[ast3.stmt]) -> None: | CODE |
| 29 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/test-stubgenc.sh | 25 | # Check if generated stubs can actually be type checked by mypy | COMMENT |
| LOW | mypyc/build_setup.py | 49 | # Check if the matching argument contains a source filename. | COMMENT |
| LOW | mypyc/irbuild/ll_builder.py | 647 | # Check if value < upper_bound | COMMENT |
| LOW | mypyc/irbuild/ll_builder.py | 655 | # Check if value >= lower_bound | COMMENT |
| LOW | mypyc/irbuild/prebuildvisitor.py | 294 | # Check if child is nested within fdef (possibly indirectly | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1015 | # Check if we have a return value | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1032 | # Check if we need to reraise the original exception from sys.exc_info | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1036 | # Check if exc_type is None | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1072 | # Check if we're in an async function with a finally block that contains await | COMMENT |
| LOW | mypyc/irbuild/classdef.py | 642 | # Check if the metaclass defines a __prepare__ method, and if so, call it. | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 275 | # Check if there's a specializer for this dunder method and type | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 801 | # Return the result | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 1419 | # Check if the adjusted index is in valid range | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 1479 | # Check if the adjusted index is in valid range | COMMENT |
| LOW | mypyc/lib-rt/build_setup.py | 49 | # Check if the matching argument contains a source filename. | COMMENT |
| LOW | mypyc/analysis/attrdefined.py | 182 | # Check if __init__ can run unpredictable code (leak 'self'). | COMMENT |
| LOW | mypyc/primitives/misc_ops.py | 113 | # Check if the current exception is a StopIteration and return its value if so. | COMMENT |
| LOW | mypy/fastparse.py | 674 | # Check if stmts are reachable and add them to current_overload, | COMMENT |
| LOW | mypy/build.py | 2085 | # Check if plugins are still the same. | COMMENT |
| LOW | mypy/expandtype.py | 253 | # Set prefix to something empty, so we don't duplicate it below. | COMMENT |
| LOW | mypy/exprtotype.py | 115 | # Check if the type is Annotated[...]. For this we need the fullname, | COMMENT |
| LOW | mypy/checkmember.py | 1241 | # Check if original variable type has type variables. For example: | COMMENT |
| LOW | mypy/ipc.py | 94 | # Check if we already have a message in the buffer before | COMMENT |
| LOW | mypy/ipc.py | 128 | # Check if we already have a message in the buffer before | COMMENT |
| LOW | mypy/util.py | 618 | # Check if we are in a human-facing terminal on a supported platform. | COMMENT |
| LOW | mypy/checkstrformat.py | 608 | # Check if there are any other errors (like missing members). | COMMENT |
| LOW | mypy/nativeparse.py | 1306 | # Check if this is a super() call - if so, convert to SuperExpr | COMMENT |
| LOW | mypy/nativeparse.py | 1924 | # Check if stmts are reachable and add them to current_overload, | COMMENT |
| LOW | mypy/stubgenc.py | 321 | # Check if the argument has a default value | COMMENT |
| LOW | mypy/semanal_main.py | 507 | # Check if the class definition itself triggers a dataclass transform (via a parent class/ | COMMENT |
| LOW | mypy/constraints.py | 1575 | # Set TypeVarTuple to empty to improve error messages. | COMMENT |
| LOW | mypy/semanal_shared.py | 438 | # Check if there is a metaclass that is decorated with `typing.dataclass_transform` | COMMENT |
| LOW | mypy/checker.py | 784 | # Check if assignment widened the inferred type of a variable; in this case we | COMMENT |
| LOW | mypy/checker.py | 859 | # Check if the setter can accept two positional arguments. | COMMENT |
| LOW | mypy/checker.py | 1668 | # Check if __init__ has an invalid return type. | COMMENT |
| LOW | mypy/checker.py | 2522 | # Check if this override is covariant. | COMMENT |
| LOW | mypy/checker.py | 3518 | # Check if the nearest common ancestor frame for the definition site | COMMENT |
| LOW | mypy/checker.py | 3698 | # Check if we are a class variable with at least one base class | COMMENT |
| LOW⚡ | mypy/semanal.py | 3949 | # Check if there is a definition in supertype. If yes, we can't safely | COMMENT |
| LOW | mypy/semanal.py | 2228 | # Check if the class definition itself triggers a dataclass transform (via a parent class/ | COMMENT |
| LOW | mypy/checkpattern.py | 184 | # Check if other subpatterns capture the same names | COMMENT |
| LOW | mypy/test/test_nativeparse.py | 102 | # Check if we should skip function bodies (when ignoring errors) | COMMENT |
| LOW | mypy/test/helpers.py | 186 | # Display message that helps visualize the differences between two | COMMENT |
| LOW | mypy/plugins/attrs.py | 362 | # Check if attribute types are ready. | COMMENT |
| LOW | mypy/plugins/attrs.py | 526 | # Check if the right hand side is a call to an attribute maker. | COMMENT |
| LOW | mypy/plugins/attrs.py | 562 | # Check if the right hand side is a call to an attribute maker. | COMMENT |
| LOW | mypy/server/update.py | 953 | # Add it to the queue of files that need to be processed fully. | COMMENT |
| LOW | mypy/server/update.py | 1049 | # Check if any attribute types were changed and need to be propagated further. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | misc/analyze_typeform_stats.py | 45 | print("Error: Could not find all required counters in output") | CODE |
| LOW | mypyc/crash.py | 14 | except Exception: | CODE |
| LOW | mypyc/test/test_external.py | 61 | except Exception as err: | CODE |
| LOW | mypyc/test-data/driver/driver.py | 29 | except Exception as e: | CODE |
| MEDIUM | mypy/build.py | 703 | print(f"Error calling the plugin(version) entry point of {plugin_path}\n", file=stdout) | CODE |
| MEDIUM | mypy/build.py | 721 | print(f"Error constructing plugin instance of {plugin_type.__name__}\n", file=stdout) | CODE |
| MEDIUM | mypy/build.py | 3595 | print(f"Error serializing {self.id}", file=self.manager.stdout) | CODE |
| LOW | mypy/build.py | 309 | except Exception as exc: | CODE |
| LOW | mypy/build.py | 686 | except Exception as exc: | CODE |
| LOW | mypy/build.py | 702 | except Exception: | CODE |
| LOW | mypy/build.py | 720 | except Exception: | CODE |
| LOW | mypy/build.py | 1760 | except Exception as e: | CODE |
| LOW | mypy/build.py | 3078 | except Exception as err: | CODE |
| LOW | mypy/build.py | 3594 | except Exception: | CODE |
| LOW | mypy/moduleinspect.py | 65 | except Exception: | CODE |
| LOW | mypy/ipc.py | 369 | except Exception as e: | CODE |
| LOW | mypy/dmypy_util.py | 30 | except Exception as e: | CODE |
| LOW | mypy/dmypy_server.py | 244 | except Exception: | CODE |
| LOW | mypy/dmypy_server.py | 1118 | except Exception: | CODE |
| LOW | mypy/errors.py | 1345 | except Exception as e: | CODE |
| LOW | mypy/stubutil.py | 149 | except Exception as e: | CODE |
| LOW | mypy/checkexpr.py | 6223 | except Exception as err: | CODE |
| LOW | mypy/__main__.py | 36 | except Exception as e: | CODE |
| LOW | mypy/__main__.py | 43 | except Exception: | CODE |
| MEDIUM | mypy/__main__.py | 14 | def console_entry() -> None: | CODE |
| LOW | mypy/checker.py | 766 | except Exception as err: | CODE |
| LOW | mypy/semanal.py | 7733 | except Exception as err: | CODE |
| LOW⚡ | mypy/stubtest.py | 1486 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 264 | except Exception as e: | CODE |
| LOW | mypy/stubtest.py | 402 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 455 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 493 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 501 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 715 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 883 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 1896 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 1934 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 1961 | except Exception: | CODE |
| LOW | mypy/build_worker/worker.py | 109 | except Exception as exc: | CODE |
| MEDIUM | mypy/build_worker/worker.py | 110 | print(f"Error writing status file {status_file}:", exc) | CODE |
| MEDIUM | mypy/build_worker/worker.py | 129 | print("Error communicating with coordinator:", exc) | CODE |
| LOW | mypy/build_worker/worker.py | 130 | except Exception as exc: | CODE |
| LOW | mypy/dmypy/client.py | 275 | except Exception: | CODE |
| LOW | mypy/test/data.py | 336 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | mypy/typeops.py | 637 | # Step 1: expand all nested unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 640 | # Step 2: fast path for single item | COMMENT |
| LOW⚡ | mypy/typeops.py | 644 | # Step 3: remove redundant unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 647 | # Step 4: If more than one literal exists in the union, try to simplify | COMMENT |
| LOW | mypy/typeops.py | 660 | # Step 5: At last, we erase any (inconsistent) extra attributes on instances. | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2834 | # Step 1: Filter call targets to remove ones where the argument counts don't match | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2839 | # Step 2: If the arguments contain a union, we try performing union math first, | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3186 | # Step 1: If we are already too deep, then stop immediately. Otherwise mypy might | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3192 | # Step 2: Find position of the first union in arguments. Return the normal inferred | COMMENT |
| LOW | mypy/checkexpr.py | 2884 | # Step 3: We try checking each branch one-by-one. | COMMENT |
| LOW | mypy/checkexpr.py | 2917 | # Step 4: Failure. At this point, we know there is no match. We fall back to trying | COMMENT |
| LOW | mypy/checkexpr.py | 2930 | # Step 5: We try and infer a second-best alternative if possible. If not, fall back | COMMENT |
| LOW | mypy/checkexpr.py | 3214 | # Step 3: Try a direct match before splitting to avoid unnecessary union splits | COMMENT |
| LOW | mypy/checkexpr.py | 3234 | # Step 4: Split the first remaining union type in arguments into items and | COMMENT |
| LOW | mypy/checkexpr.py | 3260 | # Step 5: If splitting succeeded, then filter out duplicate items before returning. | COMMENT |
| LOW | mypy/checkexpr.py | 4324 | # Step 1: We first try leaving the right arguments alone and destructure | COMMENT |
| LOW | mypy/checkexpr.py | 4348 | # Step 2: If that fails, we try again but also destructure the right argument. | COMMENT |
| LOW | mypy/fixup.py | 60 | # NOTE: This method isn't (yet) part of the NodeVisitor API. | COMMENT |
| LOW | mypy/fixup.py | 115 | # NOTE: This method *definitely* isn't part of the NodeVisitor API. | COMMENT |
| LOW⚡ | mypy/checker.py | 6749 | # Step 1: Obtain the types of each operand and whether or not we can | COMMENT |
| LOW | mypy/checker.py | 6783 | # Step 2: Group operands chained by either the 'is' or '==' operands | COMMENT |
| LOW | mypy/checker.py | 6803 | # Step 3: Analyze each group and infer more precise type maps for each | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | mypy/typeops.py | 637 | # Step 1: expand all nested unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 640 | # Step 2: fast path for single item | COMMENT |
| LOW⚡ | mypy/typeops.py | 644 | # Step 3: remove redundant unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 647 | # Step 4: If more than one literal exists in the union, try to simplify | COMMENT |
| LOW | mypy/typeops.py | 660 | # Step 5: At last, we erase any (inconsistent) extra attributes on instances. | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2834 | # Step 1: Filter call targets to remove ones where the argument counts don't match | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2839 | # Step 2: If the arguments contain a union, we try performing union math first, | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3186 | # Step 1: If we are already too deep, then stop immediately. Otherwise mypy might | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3192 | # Step 2: Find position of the first union in arguments. Return the normal inferred | COMMENT |
| LOW | mypy/checkexpr.py | 2884 | # Step 3: We try checking each branch one-by-one. | COMMENT |
| LOW | mypy/checkexpr.py | 2917 | # Step 4: Failure. At this point, we know there is no match. We fall back to trying | COMMENT |
| LOW | mypy/checkexpr.py | 2930 | # Step 5: We try and infer a second-best alternative if possible. If not, fall back | COMMENT |
| LOW | mypy/checkexpr.py | 3214 | # Step 3: Try a direct match before splitting to avoid unnecessary union splits | COMMENT |
| LOW | mypy/checkexpr.py | 3234 | # Step 4: Split the first remaining union type in arguments into items and | COMMENT |
| LOW | mypy/checkexpr.py | 3260 | # Step 5: If splitting succeeded, then filter out duplicate items before returning. | COMMENT |
| LOW | mypy/checkexpr.py | 4324 | # Step 1: We first try leaving the right arguments alone and destructure | COMMENT |
| LOW | mypy/checkexpr.py | 4348 | # Step 2: If that fails, we try again but also destructure the right argument. | COMMENT |
| LOW⚡ | mypy/checker.py | 6749 | # Step 1: Obtain the types of each operand and whether or not we can | COMMENT |
| LOW | mypy/checker.py | 6783 | # Step 2: Group operands chained by either the 'is' or '==' operands | COMMENT |
| LOW | mypy/checker.py | 6803 | # Step 3: Analyze each group and infer more precise type maps for each | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mypy/main.py | 412 | # ===================== | COMMENT |
| MEDIUM | mypy/main.py | 414 | # ===================== | COMMENT |
| MEDIUM | mypy/main.py | 431 | # =============== | COMMENT |
| MEDIUM | mypy/main.py | 433 | # =============== | COMMENT |
| MEDIUM | mypy/stubtest.py | 213 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 215 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 1756 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 1758 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 2158 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 2160 | # ==================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/analyze_cache.py | 118 | CODE | |
| LOW | mypyc/build.py | 875 | CODE | |
| LOW | mypyc/options.py | 7 | CODE | |
| LOW | mypyc/irbuild/context.py | 15 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1439 | CODE | |
| LOW | mypyc/primitives/registry.py | 95 | CODE | |
| LOW | mypyc/primitives/registry.py | 163 | CODE | |
| LOW | mypyc/primitives/registry.py | 214 | CODE | |
| LOW | mypyc/primitives/registry.py | 264 | CODE | |
| LOW | mypyc/primitives/registry.py | 304 | CODE | |
| LOW | mypyc/primitives/registry.py | 347 | CODE | |
| LOW | mypy/fastparse.py | 2167 | CODE | |
| LOW | mypy/stubgen.py | 1720 | CODE | |
| LOW | mypy/checkmember.py | 165 | CODE | |
| LOW | mypy/exportjson.py | 272 | CODE | |
| LOW | mypy/types.py | 2176 | CODE | |
| LOW | mypy/types.py | 2236 | CODE | |
| LOW | mypy/join.py | 920 | CODE | |
| LOW | mypy/typeanal.py | 204 | CODE | |
| LOW | mypy/gclogger.py | 48 | CODE | |
| LOW | mypy/errors.py | 594 | CODE | |
| LOW | mypy/nodes.py | 4250 | CODE | |
| LOW | mypy/main.py | 1408 | CODE | |
| LOW | mypy/semanal_shared.py | 187 | CODE | |
| LOW | mypy/semanal.py | 7736 | CODE | |
| LOW | mypy/semanal.py | 7791 | CODE | |
| LOW | mypy/semanal.py | 7840 | CODE | |
| LOW | mypy/subtypes.py | 91 | CODE | |
| LOW | mypy/test/helpers.py | 521 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mypyc/test/test_annotate.py | 0 | perform a runtime checking transformation test case. | STRING |
| HIGH | mypyc/test/test_irbuild.py | 0 | perform a runtime checking transformation test case. | STRING |
| HIGH | mypyc/test/test_refcount.py | 0 | perform a runtime checking transformation test case. | STRING |
| HIGH | mypyc/test/test_exceptions.py | 0 | perform a runtime checking transformation test case. | STRING |
| HIGH | mypyc/test/test_alwaysdefined.py | 0 | perform a runtime checking transformation test case. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | mypy/plugins/common.py | 252 | cls.info.defn.defs.body.append(func) | CODE |
| CRITICAL | mypy/plugins/common.py | 301 | cls.info.defn.defs.body.append(overload_def) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mypy/server/deps.py | 342 | # In this example we add <Super[wildcard]> -> <Sub>, to invalidate Sub if | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypyc/irbuild/env_class.py | 137 | # If this is a FuncDef, then make sure to load the FuncDef into its own environment | COMMENT |
| LOW | mypy/types.py | 81 | # make sure to audit the following methods: | COMMENT |
| MEDIUM | mypy/errors.py | 110 | # For errors on the same line you can use this to customize their sorting | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/analyze_cache.py | 92 | def helper(chunk: JsonDict) -> JsonDict: | CODE |
| LOW | misc/analyze_cache.py | 124 | def helper(chunk: JsonDict) -> JsonDict: | CODE |
| LOW | mypy/semanal_pass1.py | 48 | def do_stuff() -> None: | STRING |
| LOW | mypy/semanal.py | 628 | def helper(defs: list[Statement]) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypy/checkexpr.py | 6206 | # TODO: consider using cache for more expression kinds. | COMMENT |
| LOW | mypy/server/deps.py | 200 | # TODO: Add tests for this function. | COMMENT |