Feature
Recently I made a PR for ty to allow the type checker to inspect calls to struct.unpack and return static typing instead of having to cast() or ignoring the type. I believe mypy should add this too.
astral-sh/ty#2437
astral-sh/ruff#22562
Examples:
https://github.com/astral-sh/ruff/blob/main/crates/ty_python_semantic/resources/mdtest/struct_unpack.md