Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dmypy suggest crashes if the checked files emit messages and suggesting a stdlib function (?) #21765

Copy link
Copy link

Description

@bzoracler
Issue body actions
$ dmypy run -- --config-file=mypy-test.ini
Daemon started
pkg/__init__.py:1: note: Revealed type is "Literal[1]?"
Success: no issues found in 1 source file
$ dmypy suggest os.path.islink --callsites
pkg/__init__.py:1: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
  ...
File ".../mypy/errors.py", line 684, in _add_error_info
  assert file not in self.flushed_files

Project:

  • mypy-test.ini:
    [mypy]
    files = pkg/
  • pkg/__init__.py
    reveal_type(1)

The crash happens when:

  • One of the modules that are checked is emitting some kind of message (either note or error);
  • The suggestion is something from mypy's automatically loaded modules (I've only tested standard library ones). Suggesting something from the checked modules does not cause the crash.

Your Environment

  • Mypy version used: 2.3, master
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.13
  • Operating system and version: Ubuntu 22.04
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.