Skip to content

Instantly share code, notes, and snippets.

@AlexWaygood
Created August 8, 2026 17:47
Show Gist options
  • Select an option

  • Save AlexWaygood/5288dc24656c31ef9bd432c07bf9f852 to your computer and use it in GitHub Desktop.

Select an option

Save AlexWaygood/5288dc24656c31ef9bd432c07bf9f852 to your computer and use it in GitHub Desktop.
Minimal reproducer for order-dependent ty unsound-return-statement diagnostics
class Base:
values = ["a"]
class Parent(Base):
def __init__(self):
if self.values:
self.values = [*self.values]
def get_values(self) -> list[str]:
return self.values
from base import Parent
class Child(Parent):
def __init__(self):
self.values = self.values + ["b"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment