From 380254d8ab5cfe01c5668c1b80f451bbe6802990 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 7 Jul 2019 14:35:44 +1000 Subject: [PATCH] Dokuwiki: Use `Dict` typing over `Mapping` Mapping doesn't provide __setitem__ which we need. --- doku2git.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doku2git.py b/doku2git.py index 9a449e8..0d9e69e 100755 --- a/doku2git.py +++ b/doku2git.py @@ -2,7 +2,7 @@ ############################################################################### -from typing import List, Mapping, Iterable, Callable, Generator +from typing import List, Dict, Iterable, Callable, Generator from operator import attrgetter import os.path @@ -274,8 +274,8 @@ class Dokuwiki: editors. Either way it will never rewrite any data. """ - users: Mapping[str, User] - media: Mapping[str, List[Change]] + users: Dict[str, User] + media: Dict[str, List[Change]] changes: List[Change] def _record_media(self, change): @@ -298,7 +298,7 @@ class Dokuwiki: for k, v in self.media.items(): v.sort(key=attrgetter('timestamp'), reverse=True) - def _find_users(self) -> Mapping[str, User]: + def _find_users(self) -> Dict[str, User]: """ Parses the users.auth.php file to discover all listed users. :return: A mapping of login to User objects