Skip to content

Commit

Permalink
Dependencies: Update requirement mypy==1.3.0 (#270)
Browse files Browse the repository at this point in the history
Also move the configuration from `tox.ini` to `pyproject.toml` and
change the `.pre-commit-config.yaml` to use the local install of `mypy`
instead of in the pre-commit virtual environment.

Cherry-pick: 87982d0
  • Loading branch information
sphuber committed Jun 7, 2023
1 parent c24784e commit 171d062
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
29 changes: 15 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ repos:
args: ['-i']
additional_dependencies: ['toml']

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
additional_dependencies: [
'toml',
'types-pyyaml',
]
files: >
(?x)^(
src/plumpy/.*py|
)$
- repo: https://github.com/PyCQA/pylint
rev: v2.15.8
hooks:
Expand All @@ -51,3 +37,18 @@ repos:
docs/source/conf.py|
test/.*|
)$
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
args: [--config-file=pyproject.toml]
language: python
types: [python]
require_serial: true
pass_filenames: true
files: >-
(?x)^(
src/.*py|
)$
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ docs = [
'importlib-metadata~=4.12.0',
]
pre-commit = [
'mypy==0.991',
'mypy==1.3.0',
'pre-commit~=2.2',
'pylint==2.15.8',
'types-pyyaml'
Expand Down Expand Up @@ -91,6 +91,11 @@ show_error_codes = true
strict = true
# reduce stricness, eventually these should be removed
disallow_any_generics = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = false

[[tool.mypy.overrides]]
Expand All @@ -101,6 +106,7 @@ check_untyped_defs = false
module = [
'aio_pika.*',
'aiocontextvars.*',
'frozendict.*',
'kiwipy.*',
'nest_asyncio.*',
'tblib.*',
Expand Down

0 comments on commit 171d062

Please sign in to comment.