Closed
Description
PEP 484 says "A generic class nested in another generic class cannot use same type variables. The scope of the type variables of the outer class doesn't cover the inner one".
It provides the following example:
from typing import Generic, Iterable, TypeVar
T = TypeVar('T')
S = TypeVar('S')
class Outer(Generic[T]):
class Bad(Iterable[T]): # Error
...
Mypy does not emit an error in this case even though PEP 484 says it's not allowed.