mirror of
https://github.com/httpie/cli.git
synced 2026-06-20 11:32:56 +02:00
Start using dict comprehensions
This commit is contained in:
1 parent
ec899d70b7
commit
7f5fd130c5
5 files changed
+11
-12
No files matched your search
@@ -39,8 +39,7 @@ class PluginManager(object):
|
||||
return [plugin for plugin in self if issubclass(plugin, AuthPlugin)]
|
||||
|
||||
def get_auth_plugin_mapping(self):
|
||||
return dict((plugin.auth_type, plugin)
|
||||
for plugin in self.get_auth_plugins())
|
||||
return {plugin.auth_type: plugin for plugin in self.get_auth_plugins()}
|
||||
|
||||
def get_auth_plugin(self, auth_type):
|
||||
return self.get_auth_plugin_mapping()[auth_type]
|
||||
|
||||
Reference in new issue
Block a user