Switch a few stragglers to uv and update python to 3.12 (#7296)

Not sure how these got missed when moving other things to `uv`, but this
should clean them up.

The bump to Python 3.12 is so that we can use `@override` with the
simple import from `typing`. This is needed by the newest versions of
`ty` to do type checking. Added the relevant `@override` annotations.

Assisted-by: Antigravity with Gemini
This commit is contained in:
Chandler Carruth
2026-06-03 05:34:44 +00:00
committed by GitHub
parent 61ee4edd9c
commit b344f3af12
31 changed files with 73 additions and 36 deletions
+12 -2
View File
@@ -1,4 +1,13 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "gql==2.0.0",
# "requests",
# ]
# ///
"""Figure out comments on a GitHub PR."""
@@ -14,7 +23,7 @@ import hashlib
import importlib.util
import os
import textwrap
from typing import Any, Callable, Optional
from typing import Any, Callable, Optional, override
# Do some extra work to support direct runs.
try:
@@ -178,6 +187,7 @@ class _PRComment(_Comment):
def __lt__(self, other: "_PRComment") -> bool:
return self.timestamp < other.timestamp
@override
def format(self, long: bool) -> str:
return "%s\n%s" % (self.url, super().format(long))