PyPI / mypy-extensions / 1.1.0
mypy-extensions 1.1.0
- Source
- https://github.com/python/mypy_extensions
- Artifact scanned
mypy_extensions-1.1.0-py3-none-any.whl- Compared with
mypy_extensions-1.0.0-py3-none-any.whl(0 signals introduced since)- Files
- 1 scanned, 4 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 2 info
- Scan time
- 3.0 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 2 of 2 warn and critical signals; 2 demoted to info.
- Disclude version
- 4.3.0
- Scanned (UTC)
- 2026-10-23 04:51
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
# Typed dicts are only for static structural subtyping.likely benign Frame introspection in mypy_extensions' TypedDict metaclass to restrict instance and class checks to the stdlib typing machinery.Reasoning
This is the well-known mypy_extensions TypedDict metaclass guard that uses sys._getframe(1) to check the caller's module name and forbid isinstance/issubclass checks on TypedDict. It is a legitimate, documented pattern in a widely used typing library, with no decoding, execution, or network activity.
-
# Setting correct module is necessary to make typed dict classes pickleable. = passlikely benign Reads the caller's module name via sys._getframe to set __module__ on a generated TypedDict class for pickle compatibility.Reasoning
This sets the __module__ of a dynamically created TypedDict class from the caller's frame globals so that pickling works. It is standard, benign library code inside a try block that tolerates AttributeError and ValueError. Nothing here is obfuscated or malicious.
Reproduce This Scan
Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
|