refactor: Replace for with dictionary comprehension
This commit is contained in:
parent
d2032a5ccb
commit
e1b14bcf5a
@ -80,15 +80,11 @@ class SubscriptionManager:
|
|||||||
if not module in self._subscriptions:
|
if not module in self._subscriptions:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
tmp = {}
|
return {
|
||||||
for jid in self._subscriptions[module]:
|
jid: self._subscriptions[module][jid][keyword]["data"]
|
||||||
if not keyword in self._subscriptions[module][jid]:
|
for jid in self._subscriptions[module]
|
||||||
continue
|
if keyword in self._subscriptions[module][jid]
|
||||||
|
}
|
||||||
data = self._subscriptions[module][jid][keyword]["data"]
|
|
||||||
tmp[jid] = data
|
|
||||||
|
|
||||||
return tmp
|
|
||||||
|
|
||||||
def get_subscriptions_for_keywords(self, module, keywords):
|
def get_subscriptions_for_keywords(self, module, keywords):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user