PyPI / mypy-extensions / 1.1.0

mypy-extensions 1.1.0

Source
https://github.com/python/mypy_extensions
Tag scanned
1.1.0
Compared with
1.0.0 (0 signals introduced since)
Files
3 scanned, 3 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 2 info
Scan time
2.5 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 2 of 2 warn and critical signals; 2 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 01:49

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review frame-introspection mypy_extensions.py:18:12

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        try:
            if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools', 'typing']:
                # Typed dicts are only for static structural subtyping.
                raise TypeError('TypedDict does not support instance and class checks')
    likely benign LLM, confidence 0.95 Frame introspection in the mypy_extensions TypedDict metaclass to block instance and class checks.
    Reasoning

    This is the standard mypy_extensions TypedDict metaclass check. It uses sys._getframe to verify the caller module for a legitimate reason: rejecting isinstance/issubclass checks on TypedDict. No obfuscation or malicious behavior is present.

  2. info warn → info by review frame-introspection mypy_extensions.py:41:28

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):
            pass
    likely benign LLM, confidence 0.95 Reads the caller's module name via sys._getframe to set __module__ for pickleable TypedDict classes.
    Reasoning

    This sets the __module__ attribute of generated TypedDict classes from the caller's frame so they can be pickled. It is a well-known, benign library idiom, wrapped in a try/except for platforms without frame support.

Reproduce This Scan

Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.1.0
git clone https://github.com/python/mypy_extensions mypy_extensions && cd mypy_extensions
git checkout 1.1.0
disclude scan --severity info --diff 1.0.0 .