Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit fe98bd4

Browse files
author
staticdev
committed
Temporary add of private stubs
1 parent 45fa99a commit fe98bd4

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

mypy.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,5 @@ ignore_missing_imports = True
2828
[mypy-_pytest.*]
2929
ignore_missing_imports = True
3030

31-
[mypy-pytest_mock]
32-
ignore_missing_imports = True
33-
3431
[mypy-tomlkit.*]
3532
ignore_missing_imports = True

pytest_mock/__init__.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# incomplete
2+
3+
from .plugin import MockFixture as MockFixture

pytest_mock/plugin.pyi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# incomplete
2+
3+
from typing import Any, TypeVar, overload
4+
from unittest.mock import MagicMock
5+
6+
_T = TypeVar("_T")
7+
8+
class MockFixture:
9+
mock_module: Any # unittest.mock module
10+
def __init__(self, config: Any) -> None: ...
11+
patch: _Patcher
12+
13+
class _Patcher:
14+
mock_module: Any # unittest.mock module
15+
@overload
16+
def __call__(self, target: Any, new: _T, *args: Any, **kwargs: Any) -> _T: ...
17+
@overload
18+
def __call__(self, target: Any, *args: Any, **kwargs: Any) -> MagicMock: ...

0 commit comments

Comments
 (0)