summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@google.com>2022-10-25 22:38:07 +0000
committerLaMont Jones <lamontjones@google.com>2022-10-25 22:46:47 +0000
commit78dcd3799b50fd512f83e27cfad31bd0d6139ba4 (patch)
treed71888796465d845807ab2cfaba22a2391324856
parentacc4c857a0b6e2e33e3647028cbd312498fd5900 (diff)
downloadgit-repo-78dcd3799b50fd512f83e27cfad31bd0d6139ba4.tar.gz
sync: do not require python 3.9v2.29.4
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>
-rw-r--r--subcmds/sync.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 5818b458..8dc22141 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -26,7 +26,7 @@ import socket
26import sys 26import sys
27import tempfile 27import tempfile
28import time 28import time
29from typing import NamedTuple 29from typing import NamedTuple, List, Set
30import urllib.error 30import urllib.error
31import urllib.parse 31import urllib.parse
32import urllib.request 32import urllib.request
@@ -94,19 +94,19 @@ class _FetchResult(NamedTuple):
94 94
95 Attributes: 95 Attributes:
96 success (bool): True if successful. 96 success (bool): True if successful.
97 projects (set[str]): The names of the git directories of fetched projects. 97 projects (Set[str]): The names of the git directories of fetched projects.
98 """ 98 """
99 success: bool 99 success: bool
100 projects: set[str] 100 projects: Set[str]
101 101
102 102
103class _FetchMainResult(NamedTuple): 103class _FetchMainResult(NamedTuple):
104 """_FetchMain return value. 104 """_FetchMain return value.
105 105
106 Attributes: 106 Attributes:
107 all_projects (list[Project]): The fetched projects. 107 all_projects (List[Project]): The fetched projects.
108 """ 108 """
109 all_projects: list[Project] 109 all_projects: List[Project]
110 110
111 111
112class _CheckoutOneResult(NamedTuple): 112class _CheckoutOneResult(NamedTuple):