From a1fcad5bd6a6f71fac6f1a2f235302b2172ddd7d Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 14 Aug 2023 21:54:09 +0100 Subject: [PATCH] Add missing type annotations to the `primitives.pyi` fixture (#15871) This fixes some weird test failures I was seeing locally when trying to run just the tests in `check-enum.test` (invoked via `pytest mypy/test/testcheck.py::TypeCheckSuite::check-enum.test`) --- test-data/unit/fixtures/primitives.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-data/unit/fixtures/primitives.pyi b/test-data/unit/fixtures/primitives.pyi index c9b1e3f4e983..63128a8ae03d 100644 --- a/test-data/unit/fixtures/primitives.pyi +++ b/test-data/unit/fixtures/primitives.pyi @@ -12,7 +12,7 @@ class object: def __ne__(self, other: object) -> bool: pass class type: - def __init__(self, x) -> None: pass + def __init__(self, x: object) -> None: pass class int: # Note: this is a simplification of the actual signature @@ -30,7 +30,7 @@ class str(Sequence[str]): def __iter__(self) -> Iterator[str]: pass def __contains__(self, other: object) -> bool: pass def __getitem__(self, item: int) -> str: pass - def format(self, *args, **kwargs) -> str: pass + def format(self, *args: object, **kwargs: object) -> str: pass class bytes(Sequence[int]): def __iter__(self) -> Iterator[int]: pass def __contains__(self, other: object) -> bool: pass