Skip to content

Commit 2344070

Browse files
Thiago C. D'Ávilanicoddemus
andauthored
Full type annotations
Fix #152 Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 747a1e6 commit 2344070

File tree

8 files changed

+273
-168
lines changed

8 files changed

+273
-168
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ repos:
1919
language: python
2020
additional_dependencies: [pygments, restructuredtext_lint]
2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v0.780 # NOTE: keep this in sync with tox.ini
22+
rev: v0.782 # NOTE: keep this in sync with tox.ini
2323
hooks:
2424
- id: mypy
25-
files: ^src
25+
files: ^(src|tests)
2626
args: []
2727
additional_dependencies: [pytest>=6]

setup.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
[mypy]
2+
disallow_any_generics = True
3+
disallow_incomplete_defs = True
4+
disallow_subclassing_any = True
5+
no_implicit_optional = True
26
pretty = True
7+
show_error_codes = True
8+
strict_equality = True
9+
warn_redundant_casts = True
10+
warn_return_any = True
11+
warn_unreachable = True
12+
warn_unused_configs = True
13+
warn_unused_ignores = True

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
packages=find_packages(where="src"),
99
package_dir={"": "src"},
1010
platforms="any",
11+
package_data={"pytest_mock": ["py.typed"],},
1112
python_requires=">=3.5",
12-
install_requires=["pytest>=2.7"],
13+
install_requires=["pytest>=5.0"],
1314
use_scm_version={"write_to": "src/pytest_mock/_version.py"},
1415
setup_requires=["setuptools_scm"],
1516
url="https://github.com/pytest-dev/pytest-mock/",

src/pytest_mock/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
from pytest_mock.plugin import *
2-
from pytest_mock.plugin import _get_mock_module
2+
3+
__all__ = [
4+
"MockerFixture",
5+
"pytest_addoption",
6+
"pytest_configure",
7+
"session_mocker",
8+
"package_mocker",
9+
"module_mocker",
10+
"class_mocker",
11+
"mocker",
12+
]

0 commit comments

Comments
 (0)