♻️ Slimmed down a method a bit
This commit is contained in:
1 parent
b857fd1e24
commit
855cdad612
1 file changed
+3
-7
@@ -368,15 +368,11 @@ class PluginInfo(object):
|
||||
object: The plugin's implementation if it matches all of the requested ``types``, None otherwise.
|
||||
"""
|
||||
|
||||
if not self.implementation:
|
||||
if self.implementation and all(map(lambda t: isinstance(self.implementation, t), types)):
|
||||
return self.implementation
|
||||
else:
|
||||
return None
|
||||
|
||||
for t in types:
|
||||
if not isinstance(self.implementation, t):
|
||||
return None
|
||||
|
||||
return self.implementation
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user