diff --git a/src/allmydata/storage_client.py b/src/allmydata/storage_client.py index 2a3b1dbad..c95d72dbf 100644 --- a/src/allmydata/storage_client.py +++ b/src/allmydata/storage_client.py @@ -187,10 +187,10 @@ class StorageClientConfig(object): grid_manager_keys, ) - def get_configured_storage_plugins(self): + def get_configured_storage_plugins(self) -> dict[str, IFoolscapStoragePlugin]: """ - :returns Dict[str, IFoolscapStoragePlugin]: a dict mapping names - to instances for all available plugins + :returns: a mapping from names to instances for all available + plugins :raises MissingPlugin: if the configuration asks for a plugin for which there is no corresponding instance (e.g. it is diff --git a/src/allmydata/test/test_storage_client.py b/src/allmydata/test/test_storage_client.py index d719f227b..97ce9fe68 100644 --- a/src/allmydata/test/test_storage_client.py +++ b/src/allmydata/test/test_storage_client.py @@ -186,7 +186,7 @@ class UnrecognizedAnnouncement(unittest.TestCase): def _tub_maker(self, overrides): return Service() - def native_storage_server(self, config=None): + def native_storage_server(self, config: Optional[StorageClientConfig] = None) -> NativeStorageServer: """ Make a ``NativeStorageServer`` out of an unrecognizable announcement. """ @@ -196,7 +196,7 @@ class UnrecognizedAnnouncement(unittest.TestCase): self._tub_maker, {}, node_config=EMPTY_CLIENT_CONFIG, - config=config or StorageClientConfig(), + config=config if config is not None else StorageClientConfig(), ) def test_no_exceptions(self): @@ -248,10 +248,10 @@ class UnrecognizedAnnouncement(unittest.TestCase): An exception is produced if the plugin is missing """ with self.assertRaises(MissingPlugin): - _ = self.native_storage_server( + self.native_storage_server( StorageClientConfig( storage_plugins={ - "nothing": {} + "missing-plugin-name": {} } ) )