From 33a887c89fc176cbc66a5efc5df123b66d3abc99 Mon Sep 17 00:00:00 2001 From: unknown <850104137@qq.com> Date: Sun, 15 Dec 2024 21:05:48 +0800 Subject: [PATCH] Fix issue #1594: Modify manager.py to implement plugin authentication --- httpie/plugins/manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/httpie/plugins/manager.py b/httpie/plugins/manager.py index 27af6eedac..7d5a3825a8 100644 --- a/httpie/plugins/manager.py +++ b/httpie/plugins/manager.py @@ -81,7 +81,8 @@ def load_installed_plugins(self, directory: Optional[Path] = None): # Auth def get_auth_plugins(self) -> List[Type[AuthPlugin]]: - return self.filter(AuthPlugin) + return [plugin for plugin in self if issubclass(plugin, AuthPlugin)] + # return self.filter(AuthPlugin) def get_auth_plugin_mapping(self) -> Dict[str, Type[AuthPlugin]]: return { @@ -107,7 +108,8 @@ def get_converters(self) -> List[Type[ConverterPlugin]]: # Adapters def get_transport_plugins(self) -> List[Type[TransportPlugin]]: - return self.filter(TransportPlugin) + return [plugin for plugin in self if issubclass(plugin, TransportPlugin)] + # return self.filter(TransportPlugin) def __str__(self): return repr_dict({