Looks like we have a typeshed bug: ``` from unittest.mock import patch def addition(a: int, b:int) -> int: return a+b @patch('test.addition') def patch_test(mock): print(mock) if __name__ == "__main__": patch_test() ``` In this simple example mypy says: ``` test.py:12: error: Missing positional argument "mock" in call to "patch_test" [call-arg] ``` Undoing https://github.com/python/typeshed/commit/9e86c6026a00a7bcc6c77ec8f7925a99930ee983 fixes it
Activity
[-]incorrect types for decorated functions[/-][+]incorrect types for functions decorated with `@mock.patch`[/+]Fix @patch when `new` is missing
new
is missing #10459