Skip to content

Instantly share code, notes, and snippets.

View AlexWaygood's full-sized avatar

Alex Waygood AlexWaygood

View GitHub Profile
@AlexWaygood
AlexWaygood / base.py
Created August 8, 2026 17:47
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]:
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
@AlexWaygood
AlexWaygood / README.md
Created June 23, 2026 18:07
Minimal reproducer for astral-sh/ty#3833

Minimal reproducer for astral-sh/ty#3833

This is a dependency-free reduction of astral-sh/ty#3833, which reports that ty hangs while resolving pandas.Series.__mul__ against a NumPy ndarray when using NumPy 2.5.0's stubs.

Reconstruct the file layout

GitHub Gists have a flat filename namespace, so the two stub files have path-prefixed names here. Restore the package layout before running ty:

mkdir -p numpy/_typing
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}
{"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}}