Skip to content

Mypy hangs indefinitely trying to analyse a file with huge nested dicts #14970

@AlexWaygood

Description

@AlexWaygood

Bug Report

Mypy hangs indefinitely when trying to analyse a file with huge nested dicts.

To Reproduce

  1. Copy and paste the contents of this file into a .py file: repro.txt
  2. Run mypy on the file
  3. Wait

Comments

This is similar to #14636. However, the dicts aren't nearly as deeply nested as in #14636, they're just very, very big.

The dicts are so huge because this is a partially generated file, the result of a codemod by stubdefaulter. Mypy is far from the only tool to have difficulty with this file: it also made black and flake8 hang, and crashed IDLE. Pyright did manage to analyse the file, but also took a lot longer than usual.

Your Environment

  • Mypy version used: 1.1.1; also master branch @ 2e75cba
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: 3.11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy