Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (pytest-dev#9769)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/reorder_python_imports: v2.7.1 → v3.0.1](asottile/reorder-python-imports@v2.7.1...v3.0.1)
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](asottile/pyupgrade@v2.31.0...v2.31.1)
- [github.com/pre-commit/mirrors-mypy: v0.931 → v0.940](pre-commit/mirrors-mypy@v0.931...v0.940)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix mypy errors

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and nicoddemus committed Mar 16, 2022
1 parent 2bec21e commit d52a6e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Expand Up @@ -37,12 +37,12 @@ repos:
- flake8-typing-imports==1.12.0
- flake8-docstrings==1.5.0
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.7.1
rev: v3.0.1
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py37-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand All @@ -56,7 +56,7 @@ repos:
hooks:
- id: python-use-type-annotations
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
rev: v0.940
hooks:
- id: mypy
files: ^(src/|testing/)
Expand Down
1 change: 1 addition & 0 deletions extra/setup-py.test/setup.py
@@ -1,4 +1,5 @@
import sys

from distutils.core import setup

if __name__ == "__main__":
Expand Down
4 changes: 3 additions & 1 deletion src/_pytest/config/__init__.py
Expand Up @@ -309,7 +309,9 @@ def _prepareconfig(
elif isinstance(args, os.PathLike):
args = [os.fspath(args)]
elif not isinstance(args, list):
msg = "`args` parameter expected to be a list of strings, got: {!r} (type: {})"
msg = ( # type:ignore[unreachable]
"`args` parameter expected to be a list of strings, got: {!r} (type: {})"
)
raise TypeError(msg.format(args, type(args)))

config = get_config(args, plugins)
Expand Down
4 changes: 2 additions & 2 deletions src/_pytest/mark/structures.py
Expand Up @@ -397,7 +397,7 @@ def store_mark(obj, mark: Mark) -> None:
from _pytest.scope import _ScopeName

class _SkipMarkDecorator(MarkDecorator):
@overload # type: ignore[override,misc]
@overload # type: ignore[override,misc,no-overload-impl]
def __call__(self, arg: Markable) -> Markable:
...

Expand All @@ -415,7 +415,7 @@ def __call__( # type: ignore[override]
...

class _XfailMarkDecorator(MarkDecorator):
@overload # type: ignore[override,misc]
@overload # type: ignore[override,misc,no-overload-impl]
def __call__(self, arg: Markable) -> Markable:
...

Expand Down
2 changes: 1 addition & 1 deletion testing/test_assertrewrite.py
Expand Up @@ -1059,7 +1059,7 @@ def atomic_write_failed(fn, mode="r", overwrite=False):
e = OSError()
e.errno = 10
raise e
yield
yield # type:ignore[unreachable]

monkeypatch.setattr(
_pytest.assertion.rewrite, "atomic_write", atomic_write_failed
Expand Down

0 comments on commit d52a6e6

Please sign in to comment.