8000 Allow objects matching `SupportsKeysAndGetItem` to be unpacked by bryanforbes · Pull Request #14990 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Allow objects matching SupportsKeysAndGetItem to be unpacked #14990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix more failing tests
  • Loading branch information
bryanforbes committed Apr 4, 2023
commit 197916b1d357007c03a95c51df64feb582f5526f
1 change: 1 addition & 0 deletions mypyc/test-data/fixtures/ir.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# These builtins stubs are used implicitly in AST to IR generation
# test cases.

import _typeshed
from typing import (
TypeVar, Generic, List, Iterator, Iterable, Dict, Optional, Tuple, Any, Set,
overload, Mapping, Union, Callable, Sequence, FrozenSet, Protocol
Expand Down
1 change: 1 addition & 0 deletions mypyc/test-data/fixtures/typing-full.pyi
7471
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class Sequence(Iterable[T_co], Container[T_co]):
def __getitem__(self, n: Any) -> T_co: pass

class Mapping(Iterable[T], Generic[T, T_co], metaclass=ABCMeta):
def keys(self) -> Iterable[T]: pass # Approximate return type
def __getitem__(self, key: T) -> T_co: pass
@overload
def get(self, k: T) -> Optional[T_co]: pass
Expand Down
0