Skip to content

Commit fb497b9

Browse files
WIP: fix rebase artifacts
1 parent 091d5ea commit fb497b9

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

src/pluggy/_callers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
import warnings
88

99
from ._hooks import HookImpl
10-
from ._result import _raise_wrapfail
1110
from ._result import HookCallError
1211
from ._result import Result
12+
from ._warnings import PluggyTeardownRaisedWarning
13+
1314

1415
TYPE_CHECKING = False
1516
if TYPE_CHECKING:
@@ -21,7 +22,6 @@
2122
from typing import Tuple
2223
from typing import Union
2324

24-
2525
# Need to distinguish between old- and new-style hook wrappers.
2626
# Wrapping with a tuple is the fastest type-safe way I found to do it.
2727
Teardown = Generator[None, object, object]

src/pluggy/_hooks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sys
1212
import warnings
1313

14+
1415
_Plugin = object
1516

1617
TYPE_CHECKING = False
@@ -387,6 +388,7 @@ def __getattr__(self, name: str) -> HookCaller: ...
387388

388389
_CallHistory = List[Tuple[Mapping[str, object], Optional[Callable[[Any], None]]]]
389390

391+
390392
# Historical name (pluggy<=1.2), kept for backward compatibility.
391393
_HookRelay = HookRelay
392394

src/pluggy/_importlib_metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
1111
"""
12+
1213
from __future__ import annotations
1314

1415
import importlib.metadata

src/pluggy/_manager.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,19 @@
2929

3030
TYPE_CHECKING = False
3131
if TYPE_CHECKING:
32-
from ._hooks import HookimplOpts
33-
from ._hooks import HookspecOpts
34-
35-
from ._hooks import _HookImplFunction
36-
from ._hooks import _Namespace
37-
32+
from importlib.metadata import Distribution
3833
from typing import Any
3934
from typing import Callable
4035
from typing import Final
4136
from typing import Iterable
4237
from typing import Mapping
4338
from typing import Sequence
4439
from typing import TypeAlias
45-
from importlib.metadata import Distribution
40+
41+
from ._hooks import _HookImplFunction
42+
from ._hooks import _Namespace
43+
from ._hooks import HookimplOpts
44+
from ._hooks import HookspecOpts
4645
from ._importlib_metadata import DistFacade
4746

4847
_BeforeTrace: TypeAlias = "Callable[[str, Sequence[HookImpl], Mapping[str, Any]], None]"

src/pluggy/_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
from __future__ import annotations
66

7+
78
TYPE_CHECKING = False
89
if TYPE_CHECKING:
910
from types import TracebackType
1011
from typing import Callable
1112
from typing import cast
1213
from typing import final
13-
from typing import Generic
14-
14+
from typing import Generic
1515
from typing import Optional
1616
from typing import Tuple
1717
from typing import Type

src/pluggy/_tracing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
from __future__ import annotations
66

7+
78
TYPE_CHECKING = False
89
if TYPE_CHECKING:
9-
from typing import Sequence, TypeAlias, Callable, Any, Tuple
10+
from typing import Any
11+
from typing import Callable
12+
from typing import Sequence
13+
from typing import Tuple
14+
from typing import TypeAlias
1015

1116

1217
_Writer: TypeAlias = "Callable[[str], object]"

0 commit comments

Comments
 (0)