mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
sync: do not require python 3.9
Use pre-3.9 syntax for NamedTuple, so that users do not need to have python 3.9 or later installed. Bug: b/255632143, crbug.com/gerrit/16355 Test: manually verified with python 3.8 Change-Id: I488d2d5267ed98d5c55c233cc789e629f1911c9d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/349395 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
This commit is contained in:
parent
acc4c857a0
commit
78dcd3799b
@ -26,7 +26,7 @@ import socket
|
|||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple, List, Set
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
@ -94,19 +94,19 @@ class _FetchResult(NamedTuple):
|
|||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
success (bool): True if successful.
|
success (bool): True if successful.
|
||||||
projects (set[str]): The names of the git directories of fetched projects.
|
projects (Set[str]): The names of the git directories of fetched projects.
|
||||||
"""
|
"""
|
||||||
success: bool
|
success: bool
|
||||||
projects: set[str]
|
projects: Set[str]
|
||||||
|
|
||||||
|
|
||||||
class _FetchMainResult(NamedTuple):
|
class _FetchMainResult(NamedTuple):
|
||||||
"""_FetchMain return value.
|
"""_FetchMain return value.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
all_projects (list[Project]): The fetched projects.
|
all_projects (List[Project]): The fetched projects.
|
||||||
"""
|
"""
|
||||||
all_projects: list[Project]
|
all_projects: List[Project]
|
||||||
|
|
||||||
|
|
||||||
class _CheckoutOneResult(NamedTuple):
|
class _CheckoutOneResult(NamedTuple):
|
||||||
|
Loading…
Reference in New Issue
Block a user