Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
1 change: 1 addition & 0 deletions test-data/unit/fixtures/args.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions test-data/unit/lib-stub/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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