From a5b95273d7b3b420be6bc57ec9c4cd56897425d5 Mon Sep 17 00:00:00 2001 From: meejah Date: Fri, 11 Aug 2023 23:47:24 -0600 Subject: [PATCH] typing is .. good? --- src/allmydata/storage_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index 75e717037..d35cd788b 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -33,7 +33,7 @@ Ported to Python 3. from __future__ import annotations from six import ensure_text -from typing import Union, Callable, Any, Optional, cast +from typing import Union, Callable, Any, Optional, cast, Dict from os import urandom import re import time @@ -202,14 +202,15 @@ class StorageClientConfig(object): in getPlugins(IFoolscapStoragePlugin) } - configured = dict() + # mypy doesn't like "str" in place of Any ... + configured: Dict[Any, IFoolscapStoragePlugin] = dict() for plugin_name in self.storage_plugins: try: plugin = plugins[plugin_name] except KeyError: raise MissingPlugin(plugin_name) configured[plugin_name] = plugin - return configured # type: ignore + return configured @implementer(IStorageBroker)