mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Fix PEP8 assigning lambda expression
This commit is contained in:
parent
018ded07d6
commit
5ef4bdc1f4
2 changed files with 9 additions and 4 deletions
|
@ -169,10 +169,13 @@ class DBConnection(object):
|
||||||
|
|
||||||
def upsert(self, table_name, value_dict, key_dict):
|
def upsert(self, table_name, value_dict, key_dict):
|
||||||
|
|
||||||
|
def gen_params(my_dict):
|
||||||
|
return [
|
||||||
|
"{key} = ?".format(key=k)
|
||||||
|
for k in my_dict.keys()
|
||||||
|
]
|
||||||
|
|
||||||
changes_before = self.connection.total_changes
|
changes_before = self.connection.total_changes
|
||||||
|
|
||||||
gen_params = lambda my_dict: ["{key} = ?".format(key=k) for k in my_dict.keys()]
|
|
||||||
|
|
||||||
items = list(value_dict.values()) + list(key_dict.values())
|
items = list(value_dict.values()) + list(key_dict.values())
|
||||||
self.action(
|
self.action(
|
||||||
"UPDATE {table} "
|
"UPDATE {table} "
|
||||||
|
|
|
@ -79,11 +79,13 @@ class DelugeClient(object):
|
||||||
return func
|
return func
|
||||||
|
|
||||||
def _introspect(self):
|
def _introspect(self):
|
||||||
|
def splitter(value):
|
||||||
|
return value.split(".")
|
||||||
|
|
||||||
self.modules = []
|
self.modules = []
|
||||||
|
|
||||||
methods = self.remote_call("daemon.get_method_list").get()
|
methods = self.remote_call("daemon.get_method_list").get()
|
||||||
methodmap = defaultdict(dict)
|
methodmap = defaultdict(dict)
|
||||||
splitter = lambda v: v.split(".")
|
|
||||||
|
|
||||||
for module, method in imap(splitter, methods):
|
for module, method in imap(splitter, methods):
|
||||||
methodmap[module][method] = self._create_module_method(module, method)
|
methodmap[module][method] = self._create_module_method(module, method)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue