diff --git a/mypy/semanal.py b/mypy/semanal.py index 02ce361ab5d3..db255a7dedc8 100644 --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -4546,7 +4546,7 @@ def create_getattr_var(self, getattr_defn: SymbolTableNode, def lookup_fully_qualified(self, fullname: str) -> SymbolTableNode: ret = self.lookup_fully_qualified_or_none(fullname) - assert ret is not None + assert ret is not None, fullname return ret def lookup_fully_qualified_or_none(self, fullname: str) -> Optional[SymbolTableNode]: diff --git a/test-data/unit/fixtures/args.pyi b/test-data/unit/fixtures/args.pyi index ffe54375f68e..8d0ecc00f4b6 100644 --- a/test-data/unit/fixtures/args.pyi +++ b/test-data/unit/fixtures/args.pyi @@ -27,6 +27,7 @@ class list(Sequence[T], Generic[T]): pass class int: def __eq__(self, o: object) -> bool: pass class str: pass +class bytes: pass class bool: pass class function: pass class ellipsis: pass diff --git a/test-data/unit/lib-stub/typing.pyi b/test-data/unit/lib-stub/typing.pyi index 1a6c5d36a367..57563fc9d2f6 100644 --- a/test-data/unit/lib-stub/typing.pyi +++ b/test-data/unit/lib-stub/typing.pyi @@ -47,6 +47,11 @@ class Sequence(Iterable[T_co]): # Mapping type is oversimplified intentionally. class Mapping(Iterable[T], Generic[T, T_co]): pass +class Awaitable(Protocol[T]): + def __await__(self) -> Generator[Any, Any, T]: pass + +class Coroutine(Awaitable[V], Generic[T, U, V]): pass + def final(meth: T) -> T: pass def reveal_type(__obj: T) -> T: pass