From e0092a365bed70cbd40b047ee65407b72bb30ad1 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 7 Jul 2019 14:38:21 +1000 Subject: [PATCH] doku2git: Avoid shadowing the `type` function. --- doku2git.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doku2git.py b/doku2git.py index 936bec0..c091109 100755 --- a/doku2git.py +++ b/doku2git.py @@ -324,7 +324,7 @@ class Dokuwiki: found[None] = User(login="system", real_name="system", email="system@mlug-au.org") return found - def _find_meta(self, root: str, type): + def _find_meta(self, root: str, klass): for dirpath, dirnames, filenames in os.walk(root): for file in filenames: # We don't really care about 'indexed' or 'meta' files. @@ -339,10 +339,10 @@ class Dokuwiki: # Actually read the metadata path = os.path.join(dirpath, file) - for change in self._read_meta(path, type): + for change in self._read_meta(path, klass): yield change - def _read_meta(self, path: str, type): + def _read_meta(self, path: str, klass): log.debug("extracting meta from %s", path) with open(path, 'r') as data: for entry in data: @@ -358,7 +358,7 @@ class Dokuwiki: raise RuntimeError("Empty user doesn't correspond to 'external edit'") user = None - yield type( + yield klass( timestamp=timestamp, ip=ip, operation=operation,