diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py index 60b905fbfb2b..07b66fa21b4f 100755 --- a/scripts/stubsabot.py +++ b/scripts/stubsabot.py @@ -161,7 +161,7 @@ def __str__(self) -> str: @dataclass class Remove: distribution: str - reason: str + reason: Literal["ships py.typed file", "unmaintained"] links: dict[str, str] def __str__(self) -> str: @@ -171,7 +171,7 @@ def __str__(self) -> str: @dataclass class NoUpdate: distribution: str - reason: str + reason: Literal["obsolete", "no longer updated", "up to date"] def __str__(self) -> str: return f"{colored('skipping', 'green')} ({self.reason})" @@ -642,7 +642,7 @@ async def determine_action_no_error_handling( "Typeshed release": f"{pypi_info.pypi_root}", "Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}", } - return Remove(stub_info.distribution, reason="older than 6 months", links=links) + return Remove(stub_info.distribution, reason="ships py.typed file", links=links) else: return NoUpdate(stub_info.distribution, "obsolete") if stub_info.no_longer_updated: @@ -654,7 +654,7 @@ async def determine_action_no_error_handling( "Typeshed release": f"{pypi_info.pypi_root}", "Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}", } - return Remove(stub_info.distribution, reason="no longer updated", links=links) + return Remove(stub_info.distribution, reason="unmaintained", links=links) else: return NoUpdate(stub_info.distribution, "no longer updated")