Skip to content

Commit

Permalink
Fixes for typeshed changes (#12323)
Browse files Browse the repository at this point in the history
Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja authored Mar 9, 2022
1 parent 4a744b3 commit 504779b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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

0 comments on commit 504779b

Please sign in to comment.