Skip to content

Commit

Permalink
Full type annotations
Browse files Browse the repository at this point in the history
Fix #152

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
Thiago C. D'Ávila and nicoddemus committed Aug 22, 2020
1 parent 747a1e6 commit 2344070
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 168 deletions.
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

0 comments on commit 2344070

Please sign in to comment.