Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/stubsabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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})"
Expand Down Expand Up @@ -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:
Expand All @@ -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")

Expand Down