File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
+
2
3
from distutils .core import setup
3
4
4
5
if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ def _get_directory(path: Path) -> Path:
341
341
342
342
343
343
def _get_legacy_hook_marks (
344
- method : FunctionType ,
344
+ method : object , # using object to avoid function type excess
345
345
hook_type : str ,
346
346
opt_names : Tuple [str , ...],
347
347
) -> Dict [str , bool ]:
@@ -359,10 +359,10 @@ def _get_legacy_hook_marks(
359
359
hook_opts = ", " .join (f"{ name } =True" for name , val in opts .items () if val )
360
360
message = _pytest .deprecated .HOOK_LEGACY_MARKING .format (
361
361
type = hook_type ,
362
- fullname = method .__qualname__ ,
362
+ fullname = method .__qualname__ , # type: ignore
363
363
hook_opts = hook_opts ,
364
364
)
365
- warn_explicit_for (method , message )
365
+ warn_explicit_for (cast ( FunctionType , method ) , message )
366
366
return opts
367
367
368
368
Original file line number Diff line number Diff line change 97
97
INSTANCE_COLLECTOR = PytestRemovedIn8Warning (
98
98
"The pytest.Instance collector type is deprecated and is no longer used. "
99
99
"See https://docs.pytest.org/en/latest/deprecations.html#the-pytest-instance-collector" ,
100
-
100
+ )
101
101
HOOK_LEGACY_MARKING = UnformattedWarning (
102
102
PytestDeprecationWarning ,
103
103
"The hook{type} {fullname} uses old-style configuration options (marks or attributes).\n "
Original file line number Diff line number Diff line change 1
-
2
1
import warnings
3
2
from typing import Optional
4
3
You can’t perform that action at this time.
0 commit comments