@@ -273,10 +273,10 @@ def traverse(dircmp_result):
273
273
274
274
275
275
@dataclass
276
- class Git :
276
+ class Repository :
277
277
"""Git command abstraction for our specific needs."""
278
278
279
- repository : str
279
+ remote : str
280
280
directory : Path
281
281
282
282
def run (self , * args ):
@@ -297,9 +297,9 @@ def clone(self):
297
297
"""Maybe clone the repository, if not already cloned."""
298
298
if (self .directory / ".git" ).is_dir ():
299
299
return # Already cloned
300
- logging .info ("Cloning %s into %s" , self .repository , self .directory )
300
+ logging .info ("Cloning %s into %s" , self .remote , self .directory )
301
301
self .directory .mkdir (mode = 0o775 , parents = True , exist_ok = True )
302
- run (["git" , "clone" , self .repository , self .directory ])
302
+ run (["git" , "clone" , self .remote , self .directory ])
303
303
304
304
305
305
def version_to_tuple (version ):
@@ -344,7 +344,7 @@ def locate_nearest_version(available_versions, target_version):
344
344
return tuple_to_version (found )
345
345
346
346
347
- def translation_branch (repo : Git , needed_version : str ):
347
+ def translation_branch (repo : Repository , needed_version : str ):
348
348
"""Some cpython versions may be untranslated, being either too old or
349
349
too new.
350
350
@@ -678,12 +678,12 @@ def clone_translation(self):
678
678
/ self .language .iso639_tag
679
679
/ "LC_MESSAGES"
680
680
)
681
- repo = Git (locale_repo , locale_clone_dir )
681
+ repo = Repository (locale_repo , locale_clone_dir )
682
682
repo .clone ()
683
683
repo .switch (translation_branch (repo , self .version .name ))
684
684
685
685
def clone_cpython (self ):
686
- repo = Git ("https://github.com/python/cpython.git" , self .checkout )
686
+ repo = Repository ("https://github.com/python/cpython.git" , self .checkout )
687
687
repo .clone ()
688
688
repo .switch (self .version .branch_or_tag )
689
689
0 commit comments