doku2git: prefix unused variables with an underscore
This prevents PyCharm from generating unused variable warnings.
This commit is contained in:
parent
ac7dee371a
commit
6d0b2aebe0
14
doku2git.py
14
doku2git.py
@ -88,11 +88,11 @@ class Change(object):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'{self.user}@{self.timestamp}:{self.page} "{self.description}"'
|
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
|
Generates the required commands to delete a given page
|
||||||
:param src: The Dokuwiki instance the change belongs to
|
:param _src: The Dokuwiki instance the change belongs to
|
||||||
:param dst: The path to the root of the git repository.
|
:param _dst: The path to the root of the git repository.
|
||||||
"""
|
"""
|
||||||
localpath = self.page.replace(':', os.path.sep)
|
localpath = self.page.replace(':', os.path.sep)
|
||||||
yield f'git rm --quiet "{localpath}.txt"'
|
yield f'git rm --quiet "{localpath}.txt"'
|
||||||
@ -156,10 +156,10 @@ class PageChange(Change):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*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.
|
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
|
:return: The relative path from the root of Dokuwiki to the compressed
|
||||||
data. This is always gzip compressed.
|
data. This is always gzip compressed.
|
||||||
"""
|
"""
|
||||||
@ -378,7 +378,7 @@ if __name__ == "__main__":
|
|||||||
'die() { echo "$*" 1>&2 ; exit 1; }',
|
'die() { echo "$*" 1>&2 ; exit 1; }',
|
||||||
]
|
]
|
||||||
|
|
||||||
def preamble(src, dst: str):
|
def preamble(_src, dst: str):
|
||||||
cmds = [
|
cmds = [
|
||||||
f'git init "{dst}"',
|
f'git init "{dst}"',
|
||||||
f'cd "{dst}"',
|
f'cd "{dst}"',
|
||||||
@ -387,7 +387,7 @@ if __name__ == "__main__":
|
|||||||
for c in cmds:
|
for c in cmds:
|
||||||
yield c
|
yield c
|
||||||
|
|
||||||
def finish(src, dst: str):
|
def finish(_src, _dst: str):
|
||||||
arguments = [
|
arguments = [
|
||||||
f'git commit',
|
f'git commit',
|
||||||
' --quiet',
|
' --quiet',
|
||||||
|
Loading…
Reference in New Issue
Block a user