Skip to content

Commit e4359af

Browse files
implment review: bettern name for hookwrapper helper
1 parent 8787789 commit e4359af

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pluggy/_callers.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@
2222
Teardown = Generator[None, object, object]
2323

2424

25-
def run_legacy_hookwrapper(
25+
def run_old_style_hookwrapper(
2626
hook_impl: HookImpl, hook_name: str, args: Sequence[object]
2727
) -> Teardown:
28+
"""
29+
backward compatibility wrapper to run a old style hookwrapper as a wrapper
30+
"""
31+
32+
2833
teardown: Teardown = cast(Teardown, hook_impl.function(*args))
2934
try:
3035
next(teardown)
@@ -100,7 +105,7 @@ def _multicall(
100105
try:
101106
# If this cast is not valid, a type error is raised below,
102107
# which is the desired response.
103-
function_gen = run_legacy_hookwrapper(
108+
function_gen = run_old_style_hookwrapper(
104109
hook_impl, hook_name, args
105110
)
106111

0 commit comments

Comments
 (0)