RFC: from __future__ import annotations + migrate
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import auto
|
||||
from enum import Enum
|
||||
import os
|
||||
@@ -5,9 +7,7 @@ from pathlib import Path
|
||||
import shutil
|
||||
from typing import Any
|
||||
from typing import Generator
|
||||
from typing import List
|
||||
from typing import Sequence
|
||||
from typing import Tuple
|
||||
|
||||
from _pytest.compat import assert_never
|
||||
from _pytest.config import ExitCode
|
||||
@@ -579,7 +579,7 @@ class TestLastFailed:
|
||||
|
||||
def rlf(
|
||||
fail_import: int, fail_run: int, args: Sequence[str] = ()
|
||||
) -> Tuple[Any, Any]:
|
||||
) -> tuple[Any, Any]:
|
||||
monkeypatch.setenv("FAILIMPORT", str(fail_import))
|
||||
monkeypatch.setenv("FAILTEST", str(fail_run))
|
||||
|
||||
@@ -693,7 +693,7 @@ class TestLastFailed:
|
||||
else:
|
||||
assert "rerun previous" in result.stdout.str()
|
||||
|
||||
def get_cached_last_failed(self, pytester: Pytester) -> List[str]:
|
||||
def get_cached_last_failed(self, pytester: Pytester) -> list[str]:
|
||||
config = pytester.parseconfigure()
|
||||
assert config.cache is not None
|
||||
return sorted(config.cache.get("cache/lastfailed", {}))
|
||||
|
||||
Reference in New Issue
Block a user