Skip to content

Commit

Permalink
Add missing type annotations to the primitives.pyi fixture (python#…
Browse files Browse the repository at this point in the history
…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`)
  • Loading branch information
AlexWaygood authored Aug 14, 2023
1 parent 11a94be commit a1fcad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test-data/unit/fixtures/primitives.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a1fcad5

Please sign in to comment.