Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

mypy should useList when complaining about issues with theList type, instead oflist #18530

Open
@hamirmahal

Description

@hamirmahal

Bug Report

mypy should useList when surfacing errors with theList type, notlist.

It's confusing to engineers ifmypy useslist when complaining about a type error because then engineers aresearching the source code for occurrences oflist, when the problem is actually with the usage ofList.

To Reproduce

self.orders:typing.List[typing.List[int,int]]= []

Expected Behavior

mypy should complain with

error: "List" expects 1 type argument, but 2 given  [type-arg]

Actual Behavior

mypy actually complains with

error: "list" expects 1 type argument, but 2 given  [type-arg]

Your Environment

  • Mypy version used:mypy==1.10.0
  • Mypy command-line flags: n/a
  • Mypy configuration options frommypy.ini (and other config files): n/a
  • Python version used:Python 3.10.12

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp