From 93c173ae10791ff1ae6887e59568e0058fb4b941 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 7 Jul 2019 14:34:51 +1000 Subject: [PATCH] doku2git: Use PEP8 spacing --- doku2git.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doku2git.py b/doku2git.py index d285b62..9a449e8 100755 --- a/doku2git.py +++ b/doku2git.py @@ -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: