Shannon, I'm fine with disallowing type aliases defined within a function scope. I struggle to come up with a compelling use case for this. It sounds like we have consensus that type alias definitions (both implicit and explicit) should be allowed within class scopes. Unless someone disagrees, I think we can move forward with that plan. Shantanu, thanks for volunteering to drive the next steps. I've filed these three issues for myself in the pyright issue tracker: https://github.com/microsoft/pyright/issues/2541 (Generate error when a type alias within an inner scope references a TypeVar bound to the scope) https://github.com/microsoft/pyright/issues/2542 (Disallow type aliases within function scope) https://github.com/microsoft/pyright/issues/2543 (Allow explicit type aliases within class scope) -- Eric Traut Contributor to Pyright & Pylance Microsoft