summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--color.py2
-rw-r--r--command.py6
-rw-r--r--editor.py2
-rw-r--r--event_log.py2
-rw-r--r--git_command.py6
-rw-r--r--git_config.py8
-rw-r--r--git_refs.py2
-rw-r--r--git_superproject.py2
-rw-r--r--git_trace2_event_log_base.py2
-rw-r--r--hooks.py2
-rwxr-xr-xmain.py2
-rw-r--r--manifest_xml.py6
-rw-r--r--progress.py2
-rw-r--r--project.py26
-rwxr-xr-xrepo6
-rw-r--r--subcmds/branches.py2
-rw-r--r--subcmds/sync.py4
-rw-r--r--tests/test_git_command.py2
-rw-r--r--tests/test_project.py2
19 files changed, 43 insertions, 43 deletions
diff --git a/color.py b/color.py
index 0f637489..e3e2a5f3 100644
--- a/color.py
+++ b/color.py
@@ -103,7 +103,7 @@ def SetDefaultColoring(state):
103 DEFAULT = "never" 103 DEFAULT = "never"
104 104
105 105
106class Coloring(object): 106class Coloring:
107 def __init__(self, config, section_type): 107 def __init__(self, config, section_type):
108 self._section = "color.%s" % section_type 108 self._section = "color.%s" % section_type
109 self._config = config 109 self._config = config
diff --git a/command.py b/command.py
index 9d5d56ee..a6189ed6 100644
--- a/command.py
+++ b/command.py
@@ -46,7 +46,7 @@ class UsageError(RepoExitError):
46 """Exception thrown with invalid command usage.""" 46 """Exception thrown with invalid command usage."""
47 47
48 48
49class Command(object): 49class Command:
50 """Base class for any command line action in repo.""" 50 """Base class for any command line action in repo."""
51 51
52 # Singleton for all commands to track overall repo command execution and 52 # Singleton for all commands to track overall repo command execution and
@@ -498,11 +498,11 @@ class PagedCommand(Command):
498 return True 498 return True
499 499
500 500
501class MirrorSafeCommand(object): 501class MirrorSafeCommand:
502 """Command permits itself to run within a mirror, and does not require a 502 """Command permits itself to run within a mirror, and does not require a
503 working directory. 503 working directory.
504 """ 504 """
505 505
506 506
507class GitcClientCommand(object): 507class GitcClientCommand:
508 """Command that requires the local client to be a GITC client.""" 508 """Command that requires the local client to be a GITC client."""
diff --git a/editor.py b/editor.py
index 78311f1a..10ff158b 100644
--- a/editor.py
+++ b/editor.py
@@ -22,7 +22,7 @@ from error import EditorError
22import platform_utils 22import platform_utils
23 23
24 24
25class Editor(object): 25class Editor:
26 """Manages the user's preferred text editor.""" 26 """Manages the user's preferred text editor."""
27 27
28 _editor = None 28 _editor = None
diff --git a/event_log.py b/event_log.py
index 60c1a437..ef01394a 100644
--- a/event_log.py
+++ b/event_log.py
@@ -21,7 +21,7 @@ TASK_SYNC_NETWORK = "sync-network"
21TASK_SYNC_LOCAL = "sync-local" 21TASK_SYNC_LOCAL = "sync-local"
22 22
23 23
24class EventLog(object): 24class EventLog:
25 """Event log that records events that occurred during a repo invocation. 25 """Event log that records events that occurred during a repo invocation.
26 26
27 Events are written to the log as a consecutive JSON entries, one per line. 27 Events are written to the log as a consecutive JSON entries, one per line.
diff --git a/git_command.py b/git_command.py
index 2e4974fa..0e256392 100644
--- a/git_command.py
+++ b/git_command.py
@@ -58,7 +58,7 @@ INVALID_GIT_EXIT_CODE = 126
58logger = RepoLogger(__file__) 58logger = RepoLogger(__file__)
59 59
60 60
61class _GitCall(object): 61class _GitCall:
62 @functools.lru_cache(maxsize=None) 62 @functools.lru_cache(maxsize=None)
63 def version_tuple(self): 63 def version_tuple(self):
64 ret = Wrapper().ParseGitVersion() 64 ret = Wrapper().ParseGitVersion()
@@ -148,7 +148,7 @@ def GetEventTargetPath():
148 return path 148 return path
149 149
150 150
151class UserAgent(object): 151class UserAgent:
152 """Mange User-Agent settings when talking to external services 152 """Mange User-Agent settings when talking to external services
153 153
154 We follow the style as documented here: 154 We follow the style as documented here:
@@ -272,7 +272,7 @@ def _build_env(
272 return env 272 return env
273 273
274 274
275class GitCommand(object): 275class GitCommand:
276 """Wrapper around a single git invocation.""" 276 """Wrapper around a single git invocation."""
277 277
278 def __init__( 278 def __init__(
diff --git a/git_config.py b/git_config.py
index c19f7662..4f053ed0 100644
--- a/git_config.py
+++ b/git_config.py
@@ -70,7 +70,7 @@ def _key(name):
70 return ".".join(parts) 70 return ".".join(parts)
71 71
72 72
73class GitConfig(object): 73class GitConfig:
74 _ForUser = None 74 _ForUser = None
75 75
76 _ForSystem = None 76 _ForSystem = None
@@ -430,7 +430,7 @@ class RepoConfig(GitConfig):
430 return os.path.join(repo_config_dir, ".repoconfig/config") 430 return os.path.join(repo_config_dir, ".repoconfig/config")
431 431
432 432
433class RefSpec(object): 433class RefSpec:
434 """A Git refspec line, split into its components: 434 """A Git refspec line, split into its components:
435 435
436 forced: True if the line starts with '+' 436 forced: True if the line starts with '+'
@@ -541,7 +541,7 @@ def GetUrlCookieFile(url, quiet):
541 yield cookiefile, None 541 yield cookiefile, None
542 542
543 543
544class Remote(object): 544class Remote:
545 """Configuration options related to a remote.""" 545 """Configuration options related to a remote."""
546 546
547 def __init__(self, config, name): 547 def __init__(self, config, name):
@@ -723,7 +723,7 @@ class Remote(object):
723 return self._config.GetString(key, all_keys=all_keys) 723 return self._config.GetString(key, all_keys=all_keys)
724 724
725 725
726class Branch(object): 726class Branch:
727 """Configuration options related to a single branch.""" 727 """Configuration options related to a single branch."""
728 728
729 def __init__(self, config, name): 729 def __init__(self, config, name):
diff --git a/git_refs.py b/git_refs.py
index 1f5eaab4..8e8d603a 100644
--- a/git_refs.py
+++ b/git_refs.py
@@ -28,7 +28,7 @@ R_WORKTREE_M = R_WORKTREE + "m/"
28R_M = "refs/remotes/m/" 28R_M = "refs/remotes/m/"
29 29
30 30
31class GitRefs(object): 31class GitRefs:
32 def __init__(self, gitdir): 32 def __init__(self, gitdir):
33 self._gitdir = gitdir 33 self._gitdir = gitdir
34 self._phyref = None 34 self._phyref = None
diff --git a/git_superproject.py b/git_superproject.py
index 5d8c0d4e..651b6dbb 100644
--- a/git_superproject.py
+++ b/git_superproject.py
@@ -66,7 +66,7 @@ class UpdateProjectsResult(NamedTuple):
66 fatal: bool 66 fatal: bool
67 67
68 68
69class Superproject(object): 69class Superproject:
70 """Get commit ids from superproject. 70 """Get commit ids from superproject.
71 71
72 Initializes a local copy of a superproject for the manifest. This allows 72 Initializes a local copy of a superproject for the manifest. This allows
diff --git a/git_trace2_event_log_base.py b/git_trace2_event_log_base.py
index d986b240..7b51b753 100644
--- a/git_trace2_event_log_base.py
+++ b/git_trace2_event_log_base.py
@@ -42,7 +42,7 @@ import threading
42p_init_count = 0 42p_init_count = 0
43 43
44 44
45class BaseEventLog(object): 45class BaseEventLog:
46 """Event log that records events that occurred during a repo invocation. 46 """Event log that records events that occurred during a repo invocation.
47 47
48 Events are written to the log as a consecutive JSON entries, one per line. 48 Events are written to the log as a consecutive JSON entries, one per line.
diff --git a/hooks.py b/hooks.py
index 337c2627..6ded08b9 100644
--- a/hooks.py
+++ b/hooks.py
@@ -22,7 +22,7 @@ from error import HookError
22from git_refs import HEAD 22from git_refs import HEAD
23 23
24 24
25class RepoHook(object): 25class RepoHook:
26 """A RepoHook contains information about a script to run as a hook. 26 """A RepoHook contains information about a script to run as a hook.
27 27
28 Hooks are used to run a python script before running an upload (for 28 Hooks are used to run a python script before running an upload (for
diff --git a/main.py b/main.py
index 07c360f4..a1282851 100755
--- a/main.py
+++ b/main.py
@@ -186,7 +186,7 @@ global_options.add_option(
186) 186)
187 187
188 188
189class _Repo(object): 189class _Repo:
190 def __init__(self, repodir): 190 def __init__(self, repodir):
191 self.repodir = repodir 191 self.repodir = repodir
192 self.commands = all_commands 192 self.commands = all_commands
diff --git a/manifest_xml.py b/manifest_xml.py
index 458dfb7d..d2217bb8 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -119,7 +119,7 @@ def XmlInt(node, attr, default=None):
119 ) 119 )
120 120
121 121
122class _Default(object): 122class _Default:
123 """Project defaults within the manifest.""" 123 """Project defaults within the manifest."""
124 124
125 revisionExpr = None 125 revisionExpr = None
@@ -142,7 +142,7 @@ class _Default(object):
142 return self.__dict__ != other.__dict__ 142 return self.__dict__ != other.__dict__
143 143
144 144
145class _XmlRemote(object): 145class _XmlRemote:
146 def __init__( 146 def __init__(
147 self, 147 self,
148 name, 148 name,
@@ -354,7 +354,7 @@ class SubmanifestSpec:
354 self.groups = groups or [] 354 self.groups = groups or []
355 355
356 356
357class XmlManifest(object): 357class XmlManifest:
358 """manages the repo configuration file""" 358 """manages the repo configuration file"""
359 359
360 def __init__( 360 def __init__(
diff --git a/progress.py b/progress.py
index 80bc9463..54eb8f93 100644
--- a/progress.py
+++ b/progress.py
@@ -82,7 +82,7 @@ def jobs_str(total):
82 return f"{total} job{'s' if total > 1 else ''}" 82 return f"{total} job{'s' if total > 1 else ''}"
83 83
84 84
85class Progress(object): 85class Progress:
86 def __init__( 86 def __init__(
87 self, 87 self,
88 title, 88 title,
diff --git a/project.py b/project.py
index 80c20add..c91ae217 100644
--- a/project.py
+++ b/project.py
@@ -152,7 +152,7 @@ def _ProjectHooks():
152 return _project_hook_list 152 return _project_hook_list
153 153
154 154
155class DownloadedChange(object): 155class DownloadedChange:
156 _commit_cache = None 156 _commit_cache = None
157 157
158 def __init__(self, project, base, change_id, ps_id, commit): 158 def __init__(self, project, base, change_id, ps_id, commit):
@@ -178,7 +178,7 @@ class DownloadedChange(object):
178 return self._commit_cache 178 return self._commit_cache
179 179
180 180
181class ReviewableBranch(object): 181class ReviewableBranch:
182 _commit_cache = None 182 _commit_cache = None
183 _base_exists = None 183 _base_exists = None
184 184
@@ -319,7 +319,7 @@ class DiffColoring(Coloring):
319 self.fail = self.printer("fail", fg="red") 319 self.fail = self.printer("fail", fg="red")
320 320
321 321
322class Annotation(object): 322class Annotation:
323 def __init__(self, name, value, keep): 323 def __init__(self, name, value, keep):
324 self.name = name 324 self.name = name
325 self.value = value 325 self.value = value
@@ -386,7 +386,7 @@ def _SafeExpandPath(base, subpath, skipfinal=False):
386 return path 386 return path
387 387
388 388
389class _CopyFile(object): 389class _CopyFile:
390 """Container for <copyfile> manifest element.""" 390 """Container for <copyfile> manifest element."""
391 391
392 def __init__(self, git_worktree, src, topdir, dest): 392 def __init__(self, git_worktree, src, topdir, dest):
@@ -435,7 +435,7 @@ class _CopyFile(object):
435 logger.error("error: Cannot copy file %s to %s", src, dest) 435 logger.error("error: Cannot copy file %s to %s", src, dest)
436 436
437 437
438class _LinkFile(object): 438class _LinkFile:
439 """Container for <linkfile> manifest element.""" 439 """Container for <linkfile> manifest element."""
440 440
441 def __init__(self, git_worktree, src, topdir, dest): 441 def __init__(self, git_worktree, src, topdir, dest):
@@ -518,7 +518,7 @@ class _LinkFile(object):
518 self.__linkIt(relSrc, absDest) 518 self.__linkIt(relSrc, absDest)
519 519
520 520
521class RemoteSpec(object): 521class RemoteSpec:
522 def __init__( 522 def __init__(
523 self, 523 self,
524 name, 524 name,
@@ -538,7 +538,7 @@ class RemoteSpec(object):
538 self.fetchUrl = fetchUrl 538 self.fetchUrl = fetchUrl
539 539
540 540
541class Project(object): 541class Project:
542 # These objects can be shared between several working trees. 542 # These objects can be shared between several working trees.
543 @property 543 @property
544 def shareable_dirs(self): 544 def shareable_dirs(self):
@@ -3475,7 +3475,7 @@ class Project(object):
3475 ) 3475 )
3476 return logs 3476 return logs
3477 3477
3478 class _GitGetByExec(object): 3478 class _GitGetByExec:
3479 def __init__(self, project, bare, gitdir): 3479 def __init__(self, project, bare, gitdir):
3480 self._project = project 3480 self._project = project
3481 self._bare = bare 3481 self._bare = bare
@@ -3530,7 +3530,7 @@ class Project(object):
3530 except StopIteration: 3530 except StopIteration:
3531 break 3531 break
3532 3532
3533 class _Info(object): 3533 class _Info:
3534 def __init__(self, path, omode, nmode, oid, nid, state): 3534 def __init__(self, path, omode, nmode, oid, nid, state):
3535 self.path = path 3535 self.path = path
3536 self.src_path = None 3536 self.src_path = None
@@ -3716,7 +3716,7 @@ class _DirtyError(LocalSyncFail):
3716 return "contains uncommitted changes" 3716 return "contains uncommitted changes"
3717 3717
3718 3718
3719class _InfoMessage(object): 3719class _InfoMessage:
3720 def __init__(self, project, text): 3720 def __init__(self, project, text):
3721 self.project = project 3721 self.project = project
3722 self.text = text 3722 self.text = text
@@ -3728,7 +3728,7 @@ class _InfoMessage(object):
3728 syncbuf.out.nl() 3728 syncbuf.out.nl()
3729 3729
3730 3730
3731class _Failure(object): 3731class _Failure:
3732 def __init__(self, project, why): 3732 def __init__(self, project, why):
3733 self.project = project 3733 self.project = project
3734 self.why = why 3734 self.why = why
@@ -3740,7 +3740,7 @@ class _Failure(object):
3740 syncbuf.out.nl() 3740 syncbuf.out.nl()
3741 3741
3742 3742
3743class _Later(object): 3743class _Later:
3744 def __init__(self, project, action): 3744 def __init__(self, project, action):
3745 self.project = project 3745 self.project = project
3746 self.action = action 3746 self.action = action
@@ -3766,7 +3766,7 @@ class _SyncColoring(Coloring):
3766 self.fail = self.printer("fail", fg="red") 3766 self.fail = self.printer("fail", fg="red")
3767 3767
3768 3768
3769class SyncBuffer(object): 3769class SyncBuffer:
3770 def __init__(self, config, detach_head=False): 3770 def __init__(self, config, detach_head=False):
3771 self._messages = [] 3771 self._messages = []
3772 self._failures = [] 3772 self._failures = []
diff --git a/repo b/repo
index 7f24ff1e..95f9df88 100755
--- a/repo
+++ b/repo
@@ -40,7 +40,7 @@ MIN_PYTHON_VERSION_HARD = (3, 5)
40 40
41 41
42# Keep basic logic in sync with repo_trace.py. 42# Keep basic logic in sync with repo_trace.py.
43class Trace(object): 43class Trace:
44 """Trace helper logic.""" 44 """Trace helper logic."""
45 45
46 REPO_TRACE = "REPO_TRACE" 46 REPO_TRACE = "REPO_TRACE"
@@ -1214,7 +1214,7 @@ def _FindRepo():
1214 return (repo, os.path.join(curdir, repodir)) 1214 return (repo, os.path.join(curdir, repodir))
1215 1215
1216 1216
1217class _Options(object): 1217class _Options:
1218 help = False 1218 help = False
1219 version = False 1219 version = False
1220 1220
@@ -1258,7 +1258,7 @@ def _ParseArguments(args):
1258 return cmd, opt, arg 1258 return cmd, opt, arg
1259 1259
1260 1260
1261class Requirements(object): 1261class Requirements:
1262 """Helper for checking repo's system requirements.""" 1262 """Helper for checking repo's system requirements."""
1263 1263
1264 REQUIREMENTS_NAME = "requirements.json" 1264 REQUIREMENTS_NAME = "requirements.json"
diff --git a/subcmds/branches.py b/subcmds/branches.py
index 33523c38..d9a190be 100644
--- a/subcmds/branches.py
+++ b/subcmds/branches.py
@@ -28,7 +28,7 @@ class BranchColoring(Coloring):
28 self.notinproject = self.printer("notinproject", fg="red") 28 self.notinproject = self.printer("notinproject", fg="red")
29 29
30 30
31class BranchInfo(object): 31class BranchInfo:
32 def __init__(self, name): 32 def __init__(self, name):
33 self.name = name 33 self.name = name
34 self.current = 0 34 self.current = 0
diff --git a/subcmds/sync.py b/subcmds/sync.py
index e1f7d019..dbdaa2c2 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -1908,7 +1908,7 @@ def _PostRepoFetch(rp, repo_verify=True, verbose=False):
1908 print("repo version %s is current" % rp.work_git.describe(HEAD)) 1908 print("repo version %s is current" % rp.work_git.describe(HEAD))
1909 1909
1910 1910
1911class _FetchTimes(object): 1911class _FetchTimes:
1912 _ALPHA = 0.5 1912 _ALPHA = 0.5
1913 1913
1914 def __init__(self, manifest): 1914 def __init__(self, manifest):
@@ -1951,7 +1951,7 @@ class _FetchTimes(object):
1951 platform_utils.remove(self._path, missing_ok=True) 1951 platform_utils.remove(self._path, missing_ok=True)
1952 1952
1953 1953
1954class LocalSyncState(object): 1954class LocalSyncState:
1955 _LAST_FETCH = "last_fetch" 1955 _LAST_FETCH = "last_fetch"
1956 _LAST_CHECKOUT = "last_checkout" 1956 _LAST_CHECKOUT = "last_checkout"
1957 1957
diff --git a/tests/test_git_command.py b/tests/test_git_command.py
index 881cccb8..7c108ccd 100644
--- a/tests/test_git_command.py
+++ b/tests/test_git_command.py
@@ -72,7 +72,7 @@ class GitCommandWaitTest(unittest.TestCase):
72 """Tests the GitCommand class .Wait()""" 72 """Tests the GitCommand class .Wait()"""
73 73
74 def setUp(self): 74 def setUp(self):
75 class MockPopen(object): 75 class MockPopen:
76 rc = 0 76 rc = 0
77 77
78 def __init__(self): 78 def __init__(self):
diff --git a/tests/test_project.py b/tests/test_project.py
index 79728d70..42f0f6e5 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -48,7 +48,7 @@ def TempGitTree():
48 yield tempdir 48 yield tempdir
49 49
50 50
51class FakeProject(object): 51class FakeProject:
52 """A fake for Project for basic functionality.""" 52 """A fake for Project for basic functionality."""
53 53
54 def __init__(self, worktree): 54 def __init__(self, worktree):