8000 Fixes for typeshed changes (#12323) · python/mypy@504779b · GitHub
[go: up one dir, main page]

Skip to content

Commit 504779b

Browse files
authored
Fixes for typeshed changes (#12323)
Co-authored-by: hauntsaninja <>
1 parent 4a744b3 commit 504779b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

mypy/semanal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4546,7 +4546,7 @@ def create_getattr_var(self, getattr_defn: SymbolTableNode,
45464546

45474547
def lookup_fully_qualified(self, fullname: str) -> SymbolTableNode:
45484548
ret = self.lookup_fully_qualified_or_none(fullname)
4549-
assert ret is not None
4549+
assert ret is not None, fullname
45504550
return ret
45514551

45524552
def lookup_fully_qualified_or_none(self, fullname: str) -> Optional[SymbolTableNode]:

test-data/unit/fixtures/args.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class list(Sequence[T], Generic[T]): pass
2727
class int:
2828
def __eq__(self, o: object) -> bool: pass
2929
class str: pass
30+
class bytes: pass
3031
class bool: pass
3132
class function: pass
3233
class ellipsis: pass

test-data/unit/lib-stub/typing.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ class Sequence(Iterable[T_co]):
4747
# Mapping type is oversimplified intentionally.
4848
class Mapping(Iterable[T], Generic[T, T_co]): pass
4949

50+
class Awaitable(Protocol[T]):
51+
def __await__(self) -> Generator[Any, Any, T]: pass
52+
53+
class Coroutine(Awaitable[V], Generic[T, U, V]): pass
54+
5055
def final(meth: T) -> T: pass
5156

5257
def reveal_type(__obj: T) -> T: pass

0 commit comments

Comments
 (0)
0