Skip to content

Commit 38f4561

Browse files
FIXUP: rebase issues and typing
1 parent b0e5036 commit 38f4561

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

extra/setup-py.test/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
from distutils.core import setup
34

45
if __name__ == "__main__":

src/_pytest/config/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def _get_directory(path: Path) -> Path:
341341

342342

343343
def _get_legacy_hook_marks(
344-
method: FunctionType,
344+
method: object, # using object to avoid function type excess
345345
hook_type: str,
346346
opt_names: Tuple[str, ...],
347347
) -> Dict[str, bool]:
@@ -359,10 +359,10 @@ def _get_legacy_hook_marks(
359359
hook_opts = ", ".join(f"{name}=True" for name, val in opts.items() if val)
360360
message = _pytest.deprecated.HOOK_LEGACY_MARKING.format(
361361
type=hook_type,
362-
fullname=method.__qualname__,
362+
fullname=method.__qualname__, # type: ignore
363363
hook_opts=hook_opts,
364364
)
365-
warn_explicit_for(method, message)
365+
warn_explicit_for(cast(FunctionType, method), message)
366366
return opts
367367

368368

src/_pytest/deprecated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
INSTANCE_COLLECTOR = PytestRemovedIn8Warning(
9898
"The pytest.Instance collector type is deprecated and is no longer used. "
9999
"See https://docs.pytest.org/en/latest/deprecations.html#the-pytest-instance-collector",
100-
100+
)
101101
HOOK_LEGACY_MARKING = UnformattedWarning(
102102
PytestDeprecationWarning,
103103
"The hook{type} {fullname} uses old-style configuration options (marks or attributes).\n"

testing/test_recwarn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import warnings
32
from typing import Optional
43

0 commit comments

Comments
 (0)