Optional static typing for Python
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 2723 finding(s).
Are imports declared and package/API names verified? 421 finding(s).
Are wrappers, guards, and repeated structures necessary? 1505 finding(s).
Which changes need focused human review? 3327 finding(s).
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.
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.
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.
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.
| 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 | 288 | def generate_c_extension_shim( | CODE |
| LOW | mypyc/build.py | 498 | 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/common.py | 57 | def generator_frame_attribute_prefix(class_fullname: str, *, is_final_class: bool) -> str: | CODE |
| LOW | mypyc/common.py | 64 | def source_name_from_generator_attribute(name: str, class_fullname: str) -> str: | 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 | 1922 | def translate_instance_contains(self, inst: Value, item: Value, op: str, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 1945 | def _non_specialized_unary_op(self, value: Value, op: str, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2707 | def inline_fixed_width_divide(self, type: RType, lhs: Value, rhs: Value, line: int) -> Value: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2841 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2911 | def translate_special_method_call( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 2939 | def _translate_special_low_level_method_call( | CODE |
| LOW | mypyc/irbuild/ll_builder.py | 3021 | def _translate_fast_optional_eq_cmp( | CODE |
| LOW | mypyc/irbuild/util.py | 276 | def get_explicit_native_class(path: str, cdef: ClassDef, errors: Errors) -> bool | None: | CODE |
| LOW | mypyc/irbuild/util.py | 322 | 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 | 40 | def _comprehension_has_lambda(node: GeneratorExpr | DictionaryComprehension) -> bool: | CODE |
| LOW | mypyc/irbuild/prebuildvisitor.py | 220 | def _visit_comprehension_with_scope(self, o: GeneratorExpr | DictionaryComprehension) -> None: | CODE |
| LOW | mypyc/irbuild/prebuildvisitor.py | 263 | def visit_dictionary_comprehension(self, o: DictionaryComprehension) -> None: | CODE |
| LOW | mypyc/irbuild/env_class.py | 331 | 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 | 171 | def transform_expression_stmt(builder: IRBuilder, stmt: ExpressionStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 197 | def check_unsupported_cls_assignment(builder: IRBuilder, stmt: AssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 229 | def transform_assignment_stmt(builder: IRBuilder, stmt: AssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 305 | def transform_operator_assignment_stmt(builder: IRBuilder, stmt: OperatorAssignmentStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 330 | def import_globals_id_and_name(module_id: str, as_name: str | None) -> tuple[str, str]: | CODE |
| LOW | mypyc/irbuild/statement.py | 391 | def split_import_group_to_python_and_native( | CODE |
| LOW | mypyc/irbuild/statement.py | 418 | def transform_imports_without_grouping( | CODE |
| LOW | mypyc/irbuild/statement.py | 436 | def transform_non_native_import_group( | CODE |
| LOW | mypyc/irbuild/statement.py | 545 | def transform_import_from_buckets( | CODE |
| LOW | mypyc/irbuild/statement.py | 784 | def transform_try_except_stmt(builder: IRBuilder, t: TryStmt) -> None: | CODE |
| LOW | mypyc/irbuild/statement.py | 872 | def try_finally_resolve_control( | CODE |
| LOW | mypyc/irbuild/statement.py | 917 | def transform_try_finally_stmt( | CODE |
| LOW | mypyc/irbuild/statement.py | 954 | def transform_try_finally_stmt_async( | CODE |
| LOW | mypyc/irbuild/statement.py | 1511 | def transform_yield_from_expr(builder: IRBuilder, o: YieldFromExpr) -> Value: | CODE |
| LOW | mypyc/irbuild/statement.py | 1523 | 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 | 1680 | def is_free_variable_in_nested_func(self, fitem: FuncItem, symbol: SymbolNode) -> bool: | CODE |
| LOW⚡ | mypyc/irbuild/builder.py | 1688 | def is_captured_by_nested_func(self, symbol: SymbolNode) -> bool: | CODE |
| LOW⚡ | mypyc/irbuild/builder.py | 1694 | def add_var_to_generator_frame( | CODE |
| LOW | mypyc/irbuild/builder.py | 404 | def load_bytes_from_str_literal(self, value: str, line: int = -1) -> Value: | CODE |
| LOW | mypyc/irbuild/builder.py | 509 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 694 | def maybe_add_implicit_return(self) -> None: | CODE |
| 1231 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 | 660 | CODE | |
| LOW | mypyc/build.py | 719 | CODE | |
| LOW | mypyc/build.py | 813 | CODE | |
| LOW | mypyc/build.py | 904 | 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/targets.py | 45 | 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 | 1644 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2028 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2068 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2211 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2383 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2501 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2639 | CODE | |
| LOW | mypyc/irbuild/ll_builder.py | 2757 | CODE | |
| LOW | mypyc/irbuild/util.py | 72 | CODE | |
| LOW | mypyc/irbuild/util.py | 190 | CODE | |
| LOW | mypyc/irbuild/util.py | 218 | CODE | |
| LOW | mypyc/irbuild/util.py | 276 | CODE | |
| LOW | mypyc/irbuild/mapper.py | 73 | CODE | |
| LOW | mypyc/irbuild/prebuildvisitor.py | 168 | CODE | |
| LOW | mypyc/irbuild/env_class.py | 273 | 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 | 545 | CODE | |
| LOW | mypyc/irbuild/statement.py | 1277 | CODE | |
| LOW | mypyc/irbuild/constant_fold.py | 39 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1886 | CODE | |
| LOW | mypyc/irbuild/builder.py | 785 | CODE | |
| LOW | mypyc/irbuild/builder.py | 807 | CODE | |
| LOW | mypyc/irbuild/builder.py | 924 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1125 | CODE | |
| LOW | mypyc/irbuild/builder.py | 1441 | CODE | |
| LOW | mypyc/irbuild/classdef.py | 89 | CODE | |
| LOW | mypyc/irbuild/classdef.py | 571 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 775 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 917 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 980 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1048 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1100 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1161 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1181 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1205 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1415 | CODE | |
| LOW | mypyc/irbuild/main.py | 59 | CODE | |
| 603 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CHANGELOG.md | 3041 | # Change in semantics: previously considered members, | COMMENT |
| LOW | dev-requirements.txt | 1 | # | COMMENT |
| LOW | dev-requirements.txt | 21 | execnet==2.1.2 | COMMENT |
| LOW | dev-requirements.txt | 41 | # via -r test-requirements.txt | COMMENT |
| LOW | dev-requirements.txt | 61 | # pytest | COMMENT |
| LOW | dev-requirements.txt | 81 | # via virtualenv | COMMENT |
| LOW | test-requirements.txt | 1 | # | COMMENT |
| LOW | test-requirements.txt | 21 | lxml==6.1.2 ; python_version < "3.16" | 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 | 101 | # Minimum value for a short tagged integer. | COMMENT |
| LOW | mypyc/irbuild/prebuildvisitor.py | 81 | super().__init__() | COMMENT |
| LOW | mypyc/irbuild/statement.py | 361 | # | COMMENT |
| LOW | mypyc/irbuild/nonlocalcontrol.py | 101 | gen_generator_func_cleanup(builder, line) | COMMENT |
| LOW | mypyc/irbuild/callable_class.py | 61 | class for the nested function. | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 181 | Specializer = Callable[["IRBuilder", CallExpr, RefExpr], Value | None] | COMMENT |
| LOW | mypyc/irbuild/function.py | 941 | def load_type(builder: IRBuilder, typ: TypeInfo, unbounded_type: Type | None, line: int) -> Value: | 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/CPy.h | 1 | // Mypyc C API | 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 | 61 | // shared-refcount CAS, field validation, and per-object lock fallback -- is in | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 81 | return v; | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 101 | // mov/ldr). | COMMENT |
| LOW | mypyc/lib-rt/pythonsupport.h | 141 | Py_END_CRITICAL_SECTION(); | 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/mypyc_util.h | 1 | #ifndef MYPYC_UTIL_H | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 21 | #elif defined(_MSC_VER) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 41 | #elif defined(_MSC_VER) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 61 | #define CPY_UNROLL_LOOP_IMPL(x) _Pragma(CPY_STRINGIFY(x)) | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 101 | _Py_Dealloc(op); | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 141 | // Tag bit used for long integers | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 181 | #define CPY_SIGN_ZERO 1 | COMMENT |
| LOW | mypyc/lib-rt/mypyc_util.h | 201 | #define CPY_LONG_SIZE_SIGNED(o) ((o)->ob_base.ob_size) | COMMENT |
| LOW | mypyc/lib-rt/strings/librt_strings.c | 1 | #include "pythoncapi_compat.h" | COMMENT |
| 498 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 | 25 | CODE | |
| LOW | mypyc/build.py | 167 | 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 | |
| 320 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mypyc/irbuild/ll_builder.py | 1855 | 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 | 417 | ComparisonOp(generic_getattr_result, null, ComparisonOp.NEQ, line) | CODE |
| HIGH | mypyc/irbuild/function.py | 460 | is_delattr = builder.add(ComparisonOp(value_arg, null, ComparisonOp.EQ, line)) | CODE |
| HIGH | mypyc/irbuild/function.py | 475 | 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 | 1686 | return f"{emitter.ctype_spaced(typ)}{static_name} = {undefined};" | CODE |
| HIGH | mypyc/codegen/emitfunc.py | 452 | with a locked fallback and returns a new reference (or NULL if undefined, which | STRING |
| HIGH | mypyc/codegen/emitfunc.py | 574 | # undefined, which is precisely the error value here, so the "NULL without | COMMENT |
| HIGH | mypyc/codegen/emitfunc.py | 652 | # previously undefined), so decref the old value. | COMMENT |
| HIGH | mypyc/codegen/emit.py | 1097 | self.emit_lines(f"if ({dest} == -1.0 && PyErr_Occurred()) {{", failure, "}") | CODE |
| HIGH | mypyc/transform/spill.py | 103 | block.ops.extend([null, SetAttr(frame_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 | 2817 | return self.length() > 0 | CODE |
| HIGH⚡ | mypy/types.py | 2824 | if self.length() == 0: | CODE |
| HIGH⚡ | mypy/types.py | 2826 | 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 | 4649 | return left.length() | CODE |
| HIGH⚡ | mypy/checkexpr.py | 4653 | return left.length() - 1 + unpack.type.min_len | CODE |
| HIGH⚡ | mypy/checkexpr.py | 4654 | return left.length() - 1 | CODE |
| HIGH | mypy/checkexpr.py | 4680 | extra_items = self.min_tuple_length(left) - left.length() + 1 | CODE |
| HIGH⚡ | mypy/checker.py | 7696 | if method(typ.length(), size): | CODE |
| HIGH⚡ | mypy/checker.py | 7706 | min_len = typ.length() - 1 + unpacked.min_len | CODE |
| HIGH⚡ | mypy/checker.py | 7718 | unpack = UnpackType(unpacked.copy_modified(min_len=size - typ.length() + 1)) | CODE |
| HIGH⚡ | mypy/checker.py | 7727 | min_len = typ.length() - 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mypyc/build.py | 164 | except ImportError: | CODE |
| HIGH | mypyc/build.py | 791 | except OSError: | CODE |
| HIGH | mypyc/build_setup.py | 12 | except ImportError: | CODE |
| HIGH | mypyc/__main__.py | 43 | except FileExistsError: | CODE |
| HIGH | mypyc/irbuild/builder.py | 374 | except UnsupportedException: | CODE |
| HIGH | mypyc/irbuild/for_helpers.py | 1377 | except ValueError: # prevent crash if invalid args | CODE |
| HIGH | mypyc/lib-rt/build_setup.py | 12 | except ImportError: | CODE |
| HIGH | mypyc/ir/class_ir.py | 379 | except KeyError: | CODE |
| HIGH | mypy/build.py | 786 | except OSError: | CODE |
| HIGH | mypy/build.py | 1879 | except FileExistsError: | CODE |
| HIGH | mypy/build.py | 1895 | except FileExistsError: | CODE |
| HIGH | mypy/build.py | 461 | except (OSError, IPCException): | CODE |
| HIGH | mypy/build.py | 2348 | except OSError: | CODE |
| HIGH | mypy/build.py | 3721 | except (ModuleNotFound, CompileError): | CODE |
| HIGH | mypy/build.py | 4288 | except OSError: | CODE |
| HIGH | mypy/util.py | 418 | except AttributeError: | CODE |
| HIGH | mypy/stubgenc.py | 285 | except TypeError: | CODE |
| HIGH | mypy/dmypy_server.py | 275 | except OSError: | CODE |
| HIGH | mypy/dmypy_server.py | 256 | except OSError: | CODE |
| HIGH | mypy/messages.py | 3373 | except KeyError: | CODE |
| HIGH | mypy/checkexpr.py | 545 | except KeyError: | CODE |
| HIGH | mypy/__main__.py | 43 | except Exception: | CODE |
| HIGH | mypy/report.py | 70 | except KeyError: | CODE |
| HIGH | mypy/fscache.py | 76 | except OSError: | CODE |
| HIGH | mypy/stubtest.py | 493 | except Exception: | CODE |
| HIGH | mypy/stubtest.py | 402 | except Exception: | CODE |
| HIGH | mypy/stubtest.py | 1966 | except Exception: | CODE |
| HIGH | mypy/stubtest.py | 182 | except (OSError, TypeError, SyntaxError): | CODE |
| HIGH | mypy/stubtest.py | 186 | except TypeError: | CODE |
| HIGH | mypy/stubtest.py | 386 | except KeyError: | CODE |
| HIGH | mypy/stubtest.py | 2004 | except Exception: | CODE |
| HIGH | mypy/stubtest.py | 2293 | except BaseException: | CODE |
| HIGH | mypy/dmypy/client.py | 317 | except BadStatus: | CODE |
| HIGH | mypy/dmypy/client.py | 339 | except BadStatus: | CODE |
| HIGH | mypy/server/objgraph.py | 50 | except AssertionError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | misc/sync-typeshed.py | 188 | # Create a commit | COMMENT |
| MEDIUM | mypyc/build.py | 1016 | # 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 | 1316 | # Create a new block for the instructions immediately following the yield expression, and | COMMENT |
| MEDIUM | mypyc/irbuild/classdef.py | 491 | # Create the class | COMMENT |
| MEDIUM | mypyc/irbuild/callable_class.py | 80 | # Define the actual callable class ClassIR, and set its | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 664 | # Create a new block to handle cleanup after loop exit. | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 704 | # Create a new cleanup block for when the loop is finished. | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 708 | # Define a target containing the iterator used by the for-loop. The generator spill | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 810 | # Define a target containing the iterator used by the for-loop. The generator spill | COMMENT |
| MEDIUM | mypyc/irbuild/for_helpers.py | 1228 | # 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/emitclass.py | 1508 | # Creating the wrapper may run arbitrary code (e.g. via GC), which could | 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 | 342 | # Create a heap type based on a template non-heap type. | COMMENT |
| MEDIUM | mypyc/primitives/misc_ops.py | 360 | # 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 | 1892 | # 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 | 90 | # Create the corresponding class definition if the aliased type is subtypeable | COMMENT |
| MEDIUM | mypy/typeanal.py | 979 | # Create a named TypedDictType | COMMENT |
| MEDIUM | mypy/typeops.py | 398 | # 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 | 4648 | # Create an Instance similar to fill_typevars(). | COMMENT |
| MEDIUM | mypy/nodes.py | 4670 | # 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 | 6158 | # Create a dummy subject expression to handle cases where a match statement's subject | COMMENT |
| MEDIUM | mypy/checker.py | 2566 | # This method is a subtype of at least one union variant. | COMMENT |
| MEDIUM | mypy/checker.py | 8755 | # 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 | 751 | # We let the test harness just pass in the c file contents instead | COMMENT |
| LOW | mypyc/build.py | 751 | # We let the test harness just pass in the c file contents instead | COMMENT |
| LOW | mypyc/irbuild/ll_builder.py | 3010 | # There's no __eq__ defined, so just use object identity. | COMMENT |
| LOW | mypyc/irbuild/callable_class.py | 221 | # If accessed through the class, just return the callable | COMMENT |
| LOW | mypyc/irbuild/function.py | 641 | # If there are no decorators associated with the function, then just return the | COMMENT |
| LOW⚡ | mypyc/irbuild/function.py | 1127 | # the generated C code seems to expect that __init__ returns a char, so just return 1 | COMMENT |
| LOW | mypyc/codegen/emitmodule.py | 178 | # If we aren't doing validity checks, just return the cache data | COMMENT |
| LOW | mypyc/codegen/emitwrapper.py | 996 | # 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 | 2097 | # RawExpressionType so we just pass in 'None' for now. We'll report the | COMMENT |
| MEDIUM | mypy/build.py | 4663 | # 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 | 1087 | # 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 | 3366 | # some other type, we just return that string repr directly. | COMMENT |
| LOW | mypy/types.py | 4051 | # 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 | 1359 | # fine to just return it as-is. | COMMENT |
| LOW | mypy/typeanal.py | 1861 | # Types that we can just add directly to the literal/potential union of literals. | COMMENT |
| LOW | mypy/typeanal.py | 2909 | # TypeAliasTypes are analyzed separately already, just return it | COMMENT |
| LOW | mypy/typeops.py | 727 | # 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 | 3166 | # 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 | 2148 | # So we give up and just use function arguments for type inference, with just two | COMMENT |
| LOW | mypy/checkexpr.py | 3123 | # We try returning a precise type if we can. If not, we give up and just return 'Any'. | COMMENT |
| LOW | mypy/checkexpr.py | 3728 | # type of the left operand, as the operation will simply return False if the union's container/iterator | COMMENT |
| LOW | mypy/checkexpr.py | 4669 | # indexing it seems benign to just return the upper bound item, similar | COMMENT |
| MEDIUM⚡ | mypy/checker.py | 7724 | # Homogeneous variadic item is the case where we are most flexible. Essentially, | COMMENT |
| MEDIUM | mypy/semanal.py | 4230 | # TODO: find a more robust way to track the order of definitions. | COMMENT |
| MEDIUM | mypy/semanal.py | 6668 | # 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 | 2401 | # 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 | 764 | """Converts all attributes to @property methods in order to | STRING |
| LOW | mypy/server/deps.py | 581 | # 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 | 2841 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/util.py | 225 | def set_mypyc_attr(key: str, value: Any, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 323 | def set_module(self, module_name: str, module_path: str) -> None: | CODE |
| LOW | mypyc/irbuild/builder.py | 509 | def set_immortal_if_free_threaded(self, v: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/specialize.py | 445 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/specialize.py | 484 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 296 | def set_item(item_index: Value) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 313 | def set_item(x: Value, y: Value, z: Value, line: int) -> None: | CODE |
| LOW | mypyc/irbuild/for_helpers.py | 376 | 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 | 153 | 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 | 969 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1030 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1063 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1096 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1128 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1163 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1196 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1226 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1263 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1323 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1358 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1393 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1424 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1484 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1551 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1588 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1614 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1646 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1680 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1709 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1737 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1767 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1797 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1832 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1884 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/ir/ops.py | 1928 | def set_sources(self, new: list[Value]) -> None: | CODE |
| LOW | mypyc/codegen/emit.py | 368 | def set_undefined_value(self, target: str, rtype: RType) -> None: | CODE |
| LOW | mypyc/codegen/emitwrapper.py | 885 | def set_target(self, fn: FuncIR) -> None: | CODE |
| LOW | mypy/fastparse.py | 586 | 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 | 325 | # Check if child is nested within fdef (possibly indirectly | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1025 | # Check if we have a return value | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1042 | # Check if we need to reraise the original exception from sys.exc_info | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1046 | # Check if exc_type is None | COMMENT |
| LOW | mypyc/irbuild/statement.py | 1082 | # Check if we're in an async function with a finally block that contains await | COMMENT |
| LOW | mypyc/irbuild/classdef.py | 649 | # Check if the metaclass defines a __prepare__ method, and if so, call it. | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 289 | # Check if there's a specializer for this dunder method and type | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 911 | # Return the result | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 1527 | # Check if the adjusted index is in valid range | COMMENT |
| LOW | mypyc/irbuild/specialize.py | 1587 | # 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 | 124 | # Check if the current exception is a StopIteration and return its value if so. | COMMENT |
| LOW | mypy/fastparse.py | 676 | # Check if stmts are reachable and add them to current_overload, | COMMENT |
| LOW | mypy/build.py | 2091 | # Check if plugins are still the same. | COMMENT |
| LOW | mypy/expandtype.py | 263 | # 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 | 1248 | # Check if original variable type has type variables. For example: | COMMENT |
| LOW | mypy/ipc.py | 96 | # Check if we already have a message in the buffer before | COMMENT |
| LOW | mypy/ipc.py | 134 | # 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 | 1407 | # Check if this is a super() call - if so, convert to SuperExpr | COMMENT |
| LOW | mypy/nativeparse.py | 2064 | # Check if stmts are reachable and add them to current_overload, | COMMENT |
| LOW | mypy/stubgenc.py | 330 | # Check if the argument has a default value | COMMENT |
| LOW | mypy/semanal_main.py | 516 | # Check if the class definition itself triggers a dataclass transform (via a parent class/ | COMMENT |
| LOW | mypy/constraints.py | 1637 | # 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 | 801 | # Check if assignment widened the inferred type of a variable; in this case we | COMMENT |
| LOW | mypy/checker.py | 876 | # Check if the setter can accept two positional arguments. | COMMENT |
| LOW | mypy/checker.py | 1686 | # Check if __init__ has an invalid return type. | COMMENT |
| LOW | mypy/checker.py | 2545 | # Check if this override is covariant. | COMMENT |
| LOW | mypy/checker.py | 3555 | # Check if the nearest common ancestor frame for the definition site | COMMENT |
| LOW | mypy/checker.py | 3735 | # Check if we are a class variable with at least one base class | COMMENT |
| LOW⚡ | mypy/semanal.py | 4030 | # Check if there is a definition in supertype. If yes, we can't safely | COMMENT |
| LOW | mypy/semanal.py | 2244 | # 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 | 87 | # Check if we should skip function bodies (when ignoring errors) | COMMENT |
| LOW | mypy/test/helpers.py | 192 | # 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 | 706 | print(f"Error calling the plugin(version) entry point of {plugin_path}\n", file=stdout) | CODE |
| MEDIUM | mypy/build.py | 724 | print(f"Error constructing plugin instance of {plugin_type.__name__}\n", file=stdout) | CODE |
| MEDIUM | mypy/build.py | 3646 | print(f"Error serializing {self.id}", file=self.manager.stdout) | CODE |
| LOW | mypy/build.py | 311 | except Exception as exc: | CODE |
| LOW | mypy/build.py | 689 | except Exception as exc: | CODE |
| LOW | mypy/build.py | 705 | except Exception: | CODE |
| LOW | mypy/build.py | 723 | except Exception: | CODE |
| LOW | mypy/build.py | 1754 | except Exception as e: | CODE |
| LOW | mypy/build.py | 3097 | except Exception as err: | CODE |
| LOW | mypy/build.py | 3645 | except Exception: | CODE |
| LOW | mypy/moduleinspect.py | 65 | except Exception: | CODE |
| LOW | mypy/ipc.py | 384 | 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 | 1347 | except Exception as e: | CODE |
| LOW | mypy/stubutil.py | 149 | except Exception as e: | CODE |
| LOW | mypy/checkexpr.py | 6281 | 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 | 783 | except Exception as err: | CODE |
| LOW | mypy/semanal.py | 7821 | except Exception as err: | CODE |
| LOW⚡ | mypy/stubtest.py | 1493 | 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 | 716 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 890 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 1966 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 2004 | except Exception: | CODE |
| LOW | mypy/stubtest.py | 2031 | except Exception: | CODE |
| LOW | mypy/build_worker/worker.py | 127 | except Exception as exc: | CODE |
| MEDIUM | mypy/build_worker/worker.py | 128 | print(f"Error writing status file {status_file}:", exc) | CODE |
| MEDIUM | mypy/build_worker/worker.py | 147 | print("Error communicating with coordinator:", exc) | CODE |
| LOW | mypy/build_worker/worker.py | 148 | except Exception as exc: | CODE |
| LOW | mypy/dmypy/client.py | 275 | except Exception: | CODE |
| LOW | mypy/test/data.py | 344 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | mypy/typeops.py | 638 | # Step 1: expand all nested unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 641 | # Step 2: fast path for single item | COMMENT |
| LOW⚡ | mypy/typeops.py | 645 | # Step 3: remove redundant unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 648 | # Step 4: If more than one literal exists in the union, try to simplify | COMMENT |
| LOW | mypy/typeops.py | 661 | # Step 5: At last, we erase any (inconsistent) extra attributes on instances. | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2870 | # Step 1: Filter call targets to remove ones where the argument counts don't match | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2875 | # Step 2: If the arguments contain a union, we try performing union math first, | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3228 | # Step 1: If we are already too deep, then stop immediately. Otherwise mypy might | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3234 | # Step 2: Find position of the first union in arguments. Return the normal inferred | COMMENT |
| LOW | mypy/checkexpr.py | 2920 | # Step 3: We try checking each branch one-by-one. | COMMENT |
| LOW | mypy/checkexpr.py | 2953 | # Step 4: Failure. At this point, we know there is no match. We fall back to trying | COMMENT |
| LOW | mypy/checkexpr.py | 2966 | # Step 5: We try and infer a second-best alternative if possible. If not, fall back | COMMENT |
| LOW | mypy/checkexpr.py | 3256 | # Step 3: Try a direct match before splitting to avoid unnecessary union splits | COMMENT |
| LOW | mypy/checkexpr.py | 3276 | # Step 4: Split the first remaining union type in arguments into items and | COMMENT |
| LOW | mypy/checkexpr.py | 3302 | # Step 5: If splitting succeeded, then filter out duplicate items before returning. | COMMENT |
| LOW | mypy/checkexpr.py | 4325 | # Step 1: We first try leaving the right arguments alone and destructure | COMMENT |
| LOW | mypy/checkexpr.py | 4349 | # 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 | 6853 | # Step 1: Obtain the types of each operand and whether or not we can | COMMENT |
| LOW | mypy/checker.py | 6887 | # Step 2: Group operands chained by either the 'is' or '==' operands | COMMENT |
| LOW | mypy/checker.py | 6907 | # Step 3: Analyze each group and infer more precise type maps for each | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | mypy/typeops.py | 638 | # Step 1: expand all nested unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 641 | # Step 2: fast path for single item | COMMENT |
| LOW⚡ | mypy/typeops.py | 645 | # Step 3: remove redundant unions | COMMENT |
| LOW⚡ | mypy/typeops.py | 648 | # Step 4: If more than one literal exists in the union, try to simplify | COMMENT |
| LOW | mypy/typeops.py | 661 | # Step 5: At last, we erase any (inconsistent) extra attributes on instances. | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2870 | # Step 1: Filter call targets to remove ones where the argument counts don't match | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 2875 | # Step 2: If the arguments contain a union, we try performing union math first, | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3228 | # Step 1: If we are already too deep, then stop immediately. Otherwise mypy might | COMMENT |
| LOW⚡ | mypy/checkexpr.py | 3234 | # Step 2: Find position of the first union in arguments. Return the normal inferred | COMMENT |
| LOW | mypy/checkexpr.py | 2920 | # Step 3: We try checking each branch one-by-one. | COMMENT |
| LOW | mypy/checkexpr.py | 2953 | # Step 4: Failure. At this point, we know there is no match. We fall back to trying | COMMENT |
| LOW | mypy/checkexpr.py | 2966 | # Step 5: We try and infer a second-best alternative if possible. If not, fall back | COMMENT |
| LOW | mypy/checkexpr.py | 3256 | # Step 3: Try a direct match before splitting to avoid unnecessary union splits | COMMENT |
| LOW | mypy/checkexpr.py | 3276 | # Step 4: Split the first remaining union type in arguments into items and | COMMENT |
| LOW | mypy/checkexpr.py | 3302 | # Step 5: If splitting succeeded, then filter out duplicate items before returning. | COMMENT |
| LOW | mypy/checkexpr.py | 4325 | # Step 1: We first try leaving the right arguments alone and destructure | COMMENT |
| LOW | mypy/checkexpr.py | 4349 | # Step 2: If that fails, we try again but also destructure the right argument. | COMMENT |
| LOW⚡ | mypy/checker.py | 6853 | # Step 1: Obtain the types of each operand and whether or not we can | COMMENT |
| LOW | mypy/checker.py | 6887 | # Step 2: Group operands chained by either the 'is' or '==' operands | COMMENT |
| LOW | mypy/checker.py | 6907 | # Step 3: Analyze each group and infer more precise type maps for each | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mypy/main.py | 425 | # ===================== | COMMENT |
| MEDIUM | mypy/main.py | 427 | # ===================== | COMMENT |
| MEDIUM | mypy/main.py | 444 | # =============== | COMMENT |
| MEDIUM | mypy/main.py | 446 | # =============== | COMMENT |
| MEDIUM | mypy/stubtest.py | 213 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 215 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 1763 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 1765 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 2241 | # ==================== | COMMENT |
| MEDIUM | mypy/stubtest.py | 2243 | # ==================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | misc/analyze_cache.py | 118 | CODE | |
| LOW | mypyc/build.py | 904 | CODE | |
| LOW | mypyc/options.py | 7 | CODE | |
| LOW | mypyc/irbuild/context.py | 15 | CODE | |
| LOW | mypyc/irbuild/specialize.py | 1547 | CODE | |
| LOW | mypyc/ir/func_ir.py | 145 | 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 | 2175 | CODE | |
| LOW | mypy/stubgen.py | 1720 | CODE | |
| LOW | mypy/checkmember.py | 174 | CODE | |
| LOW | mypy/checkmember.py | 88 | CODE | |
| LOW | mypy/exportjson.py | 272 | CODE | |
| LOW | mypy/types.py | 2293 | CODE | |
| LOW | mypy/types.py | 2353 | 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 | 4265 | CODE | |
| LOW | mypy/main.py | 1429 | CODE | |
| LOW | mypy/semanal_shared.py | 187 | CODE | |
| LOW | mypy/semanal.py | 7824 | CODE | |
| LOW | mypy/semanal.py | 7879 | CODE | |
| LOW | mypy/semanal.py | 7928 | CODE | |
| LOW | mypy/subtypes.py | 97 | CODE | |
| LOW | mypy/test/helpers.py | 527 | 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 | 343 | # In this example we add <Super[wildcard]> -> <Sub>, to invalidate Sub if | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypyc/irbuild/env_class.py | 141 | # If this is a FuncDef, then make sure to load the FuncDef into its own environment | COMMENT |
| LOW | mypy/types.py | 83 | # 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 | 638 | def helper(defs: list[Statement]) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypy/checkexpr.py | 6264 | # TODO: consider using cache for more expression kinds. | COMMENT |
| LOW | mypy/server/deps.py | 201 | # TODO: Add tests for this function. | COMMENT |