RFC: from __future__ import annotations + migrate
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# mypy: allow-untyped-defs
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -6,8 +8,6 @@ import stat
|
||||
import sys
|
||||
from typing import Callable
|
||||
from typing import cast
|
||||
from typing import List
|
||||
from typing import Union
|
||||
import warnings
|
||||
|
||||
from _pytest import pathlib
|
||||
@@ -34,7 +34,7 @@ def test_tmp_path_fixture(pytester: Pytester) -> None:
|
||||
|
||||
@dataclasses.dataclass
|
||||
class FakeConfig:
|
||||
basetemp: Union[str, Path]
|
||||
basetemp: str | Path
|
||||
|
||||
@property
|
||||
def trace(self):
|
||||
@@ -394,7 +394,7 @@ class TestNumberedDir:
|
||||
def test_lock_register_cleanup_removal(self, tmp_path: Path) -> None:
|
||||
lock = create_cleanup_lock(tmp_path)
|
||||
|
||||
registry: List[Callable[..., None]] = []
|
||||
registry: list[Callable[..., None]] = []
|
||||
register_cleanup_lock_removal(lock, register=registry.append)
|
||||
|
||||
(cleanup_func,) = registry
|
||||
|
||||
Reference in New Issue
Block a user