Skip to content

Instantly share code, notes, and snippets.

@carljm
Created February 27, 2026 20:21
Show Gist options
  • Select an option

  • Save carljm/25be02c93095d31967def43354fb6527 to your computer and use it in GitHub Desktop.

Select an option

Save carljm/25be02c93095d31967def43354fb6527 to your computer and use it in GitHub Desktop.
from typing import TypeVar, Generic
T1 = TypeVar("T1")
T2 = TypeVar("T2")
class Grandparent(Generic[T1, T2]): ...
class Parent1(Grandparent[T1, T2]): ...
class Parent2(Grandparent[T1, T2]): ...
class BadChild(Parent1[T1, T2], Parent2[T2, T1]): ...
[tool.ty]
[tool.ty.rules]
undefined-reveal = "ignore"
[tool.pyrefly]
[tool.mypy]
check_untyped_defs = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment