doku2git: prefix unused variables with an underscore

This prevents PyCharm from generating unused variable warnings.
This commit is contained in:
Danny Robson 2019-07-07 14:37:09 +10:00
parent ac7dee371a
commit 6d0b2aebe0

View File

@ -88,11 +88,11 @@ class Change(object):
def __str__(self):
return f'{self.user}@{self.timestamp}:{self.page} "{self.description}"'
def _delete(self, src: str, dst: str) -> Generator[str, None, None]:
def _delete(self, _src: str, _dst: str) -> Generator[str, None, None]:
"""
Generates the required commands to delete a given page
:param src: The Dokuwiki instance the change belongs to
:param dst: The path to the root of the git repository.
:param _src: The Dokuwiki instance the change belongs to
:param _dst: The path to the root of the git repository.
"""
localpath = self.page.replace(':', os.path.sep)
yield f'git rm --quiet "{localpath}.txt"'
@ -156,10 +156,10 @@ class PageChange(Change):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def _attic(self, src) -> str:
def _attic(self, _src) -> str:
"""
Find the path to the history data within the Dokuwiki directories.
:param src: The Dokuwiki instance this change belongs to.
:param _src: The Dokuwiki instance this change belongs to.
:return: The relative path from the root of Dokuwiki to the compressed
data. This is always gzip compressed.
"""
@ -378,7 +378,7 @@ if __name__ == "__main__":
'die() { echo "$*" 1>&2 ; exit 1; }',
]
def preamble(src, dst: str):
def preamble(_src, dst: str):
cmds = [
f'git init "{dst}"',
f'cd "{dst}"',
@ -387,7 +387,7 @@ if __name__ == "__main__":
for c in cmds:
yield c
def finish(src, dst: str):
def finish(_src, _dst: str):
arguments = [
f'git commit',
' --quiet',