doku2git: Use PEP8 spacing

This commit is contained in:
Danny Robson 2019-07-07 14:34:51 +10:00
parent 2516091c4d
commit 93c173ae10

View File

@ -14,7 +14,7 @@ import itertools
###############################################################################
import logging
logging.basicConfig(level = logging.WARNING)
logging.basicConfig(level=logging.WARNING)
log = logging.getLogger()
@ -286,8 +286,8 @@ class Dokuwiki:
self.users = self._find_users()
self.media = collections.defaultdict(list)
page_generator = self._find_meta(os.path.join (self.root, 'data', 'meta'), PageChange)
media_generator = self._find_meta(os.path.join (self.root, 'data', 'media_meta'), MediaChange)
page_generator = self._find_meta(os.path.join(self.root, 'data', 'meta'), PageChange)
media_generator = self._find_meta(os.path.join(self.root, 'data', 'media_meta'), MediaChange)
self.changes = list(page_generator)
for entry in media_generator:
@ -295,7 +295,7 @@ class Dokuwiki:
self.changes.append(entry)
self.changes.sort(key=attrgetter('timestamp'))
for k,v in self.media.items():
for k, v in self.media.items():
v.sort(key=attrgetter('timestamp'), reverse=True)
def _find_users(self) -> Mapping[str, User]:
@ -324,7 +324,6 @@ class Dokuwiki:
found[None] = User(login="system", real_name="system", email="system@mlug-au.org")
return found
def _find_meta(self, root: str, type):
for dirpath, dirnames, filenames in os.walk(root):
for file in filenames:
@ -343,7 +342,6 @@ class Dokuwiki:
for change in self._read_meta(path, type):
yield change
def _read_meta(self, path: str, type):
log.debug("extracting meta from %s", path)
with open(path, 'r') as data: