Skip to content

@mock.patch produces invalid signature #4591

Closed

Description

@JukkaL

This code doesn't type check, even though it works at runtime:

from mock import patch

@patch('builtins.ord')
def f(mock) -> None:
    print(mock)

f()  # Too few arguments for "f" (mypy error)

Activity

  1. added a commit that references this issue on Oct 1, 2020
    d853f2d
  2. added a commit that references this issue on Oct 2, 2020
    2157c4a
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions