Skip to content

Commit 366966b

Browse files
Kilo59nicoddemus
andauthored
Export MockType/AsyncMockType for type annotations (#415)
Fix #414 --------- Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 852116b commit 366966b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Releases
22
========
33

4+
UNRELEASED
5+
----------
6+
7+
* `#415 <https://github.com/pytest-dev/pytest-mock/pull/415>`_: ``MockType`` and ``AsyncMockType`` can be imported from ``pytest_mock`` for type annotation purposes.
8+
9+
410
3.13.0 (2024-03-21)
511
-------------------
612

src/pytest_mock/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from pytest_mock.plugin import AsyncMockType
12
from pytest_mock.plugin import MockerFixture
3+
from pytest_mock.plugin import MockType
24
from pytest_mock.plugin import PytestMockWarning
35
from pytest_mock.plugin import class_mocker
46
from pytest_mock.plugin import mocker
@@ -11,8 +13,10 @@
1113
MockFixture = MockerFixture # backward-compatibility only (#204)
1214

1315
__all__ = [
16+
"AsyncMockType",
1417
"MockerFixture",
1518
"MockFixture",
19+
"MockType",
1620
"PytestMockWarning",
1721
"pytest_addoption",
1822
"pytest_configure",

0 commit comments

Comments
 (0)