RFC: from __future__ import annotations + migrate

This commit is contained in:
Ronny Pfannschmidt
2024-06-17 17:01:28 +02:00
parent 20dd1d6738
commit 9295f9ffff
242 changed files with 1961 additions and 1777 deletions

View File

@@ -1,10 +1,11 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import inspect
from pathlib import Path
import sys
import textwrap
from typing import Callable
from typing import Optional
from _pytest.doctest import _get_checker
from _pytest.doctest import _is_main_py
@@ -1595,7 +1596,7 @@ class Broken:
"stop", [None, _is_mocked, lambda f: None, lambda f: False, lambda f: True]
)
def test_warning_on_unwrap_of_broken_object(
stop: Optional[Callable[[object], object]],
stop: Callable[[object], object] | None,
) -> None:
bad_instance = Broken()
assert inspect.unwrap.__module__ == "inspect"