Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd95cae

Browse files
committed
Maybe better names for repository and remote.
1 parent d515559 commit fd95cae

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build_docs.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ def traverse(dircmp_result):
273273

274274

275275
@dataclass
276-
class Git:
276+
class Repository:
277277
"""Git command abstraction for our specific needs."""
278278

279-
repository: str
279+
remote: str
280280
directory: Path
281281

282282
def run(self, *args):
@@ -297,9 +297,9 @@ def clone(self):
297297
"""Maybe clone the repository, if not already cloned."""
298298
if (self.directory / ".git").is_dir():
299299
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)
301301
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])
303303

304304

305305
def version_to_tuple(version):
@@ -344,7 +344,7 @@ def locate_nearest_version(available_versions, target_version):
344344
return tuple_to_version(found)
345345

346346

347-
def translation_branch(repo: Git, needed_version: str):
347+
def translation_branch(repo: Repository, needed_version: str):
348348
"""Some cpython versions may be untranslated, being either too old or
349349
too new.
350350
@@ -678,12 +678,12 @@ def clone_translation(self):
678678
/ self.language.iso639_tag
679679
/ "LC_MESSAGES"
680680
)
681-
repo = Git(locale_repo, locale_clone_dir)
681+
repo = Repository(locale_repo, locale_clone_dir)
682682
repo.clone()
683683
repo.switch(translation_branch(repo, self.version.name))
684684

685685
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)
687687
repo.clone()
688688
repo.switch(self.version.branch_or_tag)
689689

0 commit comments

Comments
 (0)