Skip to content

Infinite typechecking #16757

@heckad

Description

@heckad
from typing import TypeVar, Generic, TypeAlias

T = TypeVar("T")


class Foo(Generic[T]):
    bar: Bar[T]

class Bar(Generic[T]):
    Foo: TypeAlias = Foo[T]

Your Environment

  • Mypy version used: 1.8.0
  • Mypy command-line flags: no
  • Mypy configuration options from mypy.ini (and other config files): default
  • Python version used: 3.12.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions