Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full type annotations #199

Merged
merged 12 commits into from
Aug 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.780 # NOTE: keep this in sync with tox.ini
rev: v0.782 # NOTE: keep this in sync with tox.ini
hooks:
- id: mypy
files: ^src
files: ^(src|tests)
args: []
additional_dependencies: [pytest>=6]
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
[mypy]
disallow_any_generics = True
disallow_incomplete_defs = True
disallow_subclassing_any = True
no_implicit_optional = True
pretty = True
show_error_codes = True
strict_equality = True
warn_redundant_casts = True
warn_return_any = True
warn_unreachable = True
warn_unused_configs = True
warn_unused_ignores = True
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
packages=find_packages(where="src"),
package_dir={"": "src"},
platforms="any",
package_data={"pytest_mock": ["py.typed"],},
python_requires=">=3.5",
install_requires=["pytest>=2.7"],
install_requires=["pytest>=5.0"],
use_scm_version={"write_to": "src/pytest_mock/_version.py"},
setup_requires=["setuptools_scm"],
url="https://github.com/pytest-dev/pytest-mock/",
Expand Down
12 changes: 11 additions & 1 deletion src/pytest_mock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
from pytest_mock.plugin import *
from pytest_mock.plugin import _get_mock_module

__all__ = [
"MockerFixture",
"pytest_addoption",
"pytest_configure",
"session_mocker",
"package_mocker",
"module_mocker",
"class_mocker",
"mocker",
]
Loading