Skip to content

Commit 38561d7

Browse files
authored
Merge pull request #365 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents f69e314 + 6e3fc5f commit 38561d7

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
repos:
2-
- repo: https://github.com/ambv/black
2+
- repo: https://github.com/psf/black
33
rev: 22.10.0
44
hooks:
55
- id: black
@@ -17,7 +17,7 @@ repos:
1717
- id: flake8
1818
additional_dependencies: [flake8-typing-imports]
1919
- repo: https://github.com/pre-commit/mirrors-mypy
20-
rev: v0.931
20+
rev: v0.990
2121
hooks:
2222
- id: mypy
2323
files: ^(src/|testing/)
@@ -36,7 +36,7 @@ repos:
3636
hooks:
3737
- id: rst-backticks
3838
- repo: https://github.com/asottile/pyupgrade
39-
rev: v3.2.0
39+
rev: v3.2.2
4040
hooks:
4141
- id: pyupgrade
4242
args: [--py37-plus]

src/pluggy/_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def __init__(self, orig: _HookCaller, remove_plugins: AbstractSet[_Plugin]) -> N
501501
self._hookexec = orig._hookexec # type: ignore[misc]
502502

503503
@property # type: ignore[misc]
504-
def _hookimpls(self) -> List["HookImpl"]: # type: ignore[override]
504+
def _hookimpls(self) -> List["HookImpl"]:
505505
return [
506506
impl
507507
for impl in self._orig._hookimpls

src/pluggy/_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def parse_hookimpl_opts(
191191
res = {} # type: ignore[assignment]
192192
if res is not None and not isinstance(res, dict):
193193
# false positive
194-
res = None
194+
res = None # type:ignore[unreachable]
195195
return res
196196

197197
def unregister(

testing/test_pluginmanager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
``PluginManager`` unit and public API testing.
33
"""
44
import pytest
5+
import sys
56
from typing import Any, List
67

78
from pluggy import (
@@ -11,7 +12,11 @@
1112
PluginManager,
1213
PluginValidationError,
1314
)
14-
from pluggy._manager import importlib_metadata
15+
16+
if sys.version_info >= (3, 8):
17+
from importlib import metadata as importlib_metadata
18+
else:
19+
import importlib_metadata
1520

1621

1722
hookspec = HookspecMarker("example")

0 commit comments

Comments
 (0)