Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Annotations in typing.Annotated are not checked #10872

Description

@NiklasRosenstein

Bug Report

To Reproduce

import typing_extensions as te
x: te.Annotated[int, Foobar] = 42

Expected Behavior

Mypy complains about Foobar not being defined. In other cases, e.g. when a function is called in an Annotated argument, it checks if the arguments passed to the function are valid (or number of arguments match, etc. etc.).

Actual Behavior

Mypy does not complain about Foobar not being defined.

Your Environment

  • Mypy version used: 0.910
  • Mypy command-line flags: n/a
  • Mypy configuration options from mypy.ini (and other config files): n/a
  • Python version used: 3.8.2
  • Operating system and version: OSX

Activity

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 wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions