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,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