GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `note:` is orphaned from actual error if there are other problems between it · Issue #10480 · python/mypy

note: is orphaned from actual error if there are other problems between it #10480

New issue
Copy link
New issue
Copy link
Closed
#20808
Closed
note: is orphaned from actual error if there are other problems between it#10480
#20808
Copy link
Labels
bugmypy got something wrongtopic-error-reportingHow we report errors

Description

@asottile
asottile
opened on May 15, 2021
Issue body actions

Bug Report

the "note" is orphaned from the actual text it is referring to. this makes it harder to understand the context

To Reproduce

def f() -> int:
    error_here()
    return 1

f(wat=1)
  1. run mypy!

Expected Behavior

Maybe something like this?

$ mypy t.py
t.py:2: error: Name 'error_here' is not defined
t.py:5: error: Unexpected keyword argument "wat" for "f"
t.py:1: note: "f" defined here
Found 2 errors in 1 file (checked 1 source file)

Actual Behavior

$ mypy t.py
t.py:1: note: "f" defined here
t.py:2: error: Name 'error_here' is not defined
t.py:5: error: Unexpected keyword argument "wat" for "f"
Found 2 errors in 1 file (checked 1 source file)

Your Environment

  • Mypy version used: 0.812
  • Mypy command-line flags: n/a
  • Mypy configuration options from mypy.ini (and other config files): n/a
  • Python version used: 3.8.5
  • Operating system and version: ubuntu 20.04
Reacted by herr kaste

Activity

  1. asottile
    added
    bugmypy got something wrong
    on May 15, 2021
  2. AlexWaygood
    added
    topic-error-reportingHow we report errors
    on Mar 31, 2022
  3. ilevkivskyi
    closed this as completedin b8b50b1on Feb 14, 2026
  4. pull
    added a commit that references this issue on Feb 14, 2026

    Use standard formatting for note on unexpected keyword (python#20808)

    b8b50b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-error-reportingHow we report errors

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.