mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +01:00
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:
@@ -16,7 +16,7 @@ bazel_dep(name = "rules_python", version = "0.27.1")
|
||||
|
||||
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
||||
python.toolchain(
|
||||
python_version = "3.11",
|
||||
python_version = "3.12",
|
||||
)
|
||||
use_repo(python, "python_versions")
|
||||
|
||||
@@ -24,7 +24,7 @@ use_repo(python, "python_versions")
|
||||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||
pip.parse(
|
||||
hub_name = "py_deps",
|
||||
python_version = "3.11",
|
||||
python_version = "3.12",
|
||||
requirements_lock = "//:requirements.txt",
|
||||
)
|
||||
use_repo(pip, "py_deps")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env -S uv run --script
|
||||
|
||||
# /// script
|
||||
# requires-python = ">=3.10"
|
||||
# requires-python = ">=3.12"
|
||||
# dependencies = [
|
||||
# "gql==2.0.0",
|
||||
# "requests",
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user