♻️ Slimmed down a method a bit

This commit is contained in:
Gina Häußge committed 2020-09-29 11:39:50 +02:00
1 parent b857fd1e24
commit 855cdad612
1 file changed
+3 -7
+3 -7
View File
@@ -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):
"""