see also https://www.flake8rules.com/rules/E741.html
also silences flake8 warnings like:
2: {tty:'./controllers/home.py:90:26: E741 ambiguous variable name 'l'':'./controllers/home.py:90:26: E741 ambiguous variable name 'l''}
2: {tty:'./controllers/logs.py:52:13: E741 ambiguous variable name 'l'':'./controllers/logs.py:52:13: E741 ambiguous variable name 'l''}
2: {tty:'./services/ganesha.py:36:40: E741 ambiguous variable name 'l'':'./services/ganesha.py:36:40: E741 ambiguous variable name 'l''}
2: 3 E741 ambiguous variable name 'l'
Signed-off-by: Kefu Chai <kchai@redhat.com>
result.sort(key=lambda l: l[0])
result.sort(key=lambda l: l[1], reverse=True)
logger.debug("language preference: %s", result)
- return [l[0] for l in result]
+ return [r[0] for r in result]
def _language_dir(self, langs):
for lang in langs:
def load_buffer(self, buf, channel_name):
lines = CephService.send_command(
'mon', 'log last', channel=channel_name, num=LOG_BUFFER_SIZE, level='debug')
- for l in lines:
- buf.appendleft(l)
+ for line in lines:
+ buf.appendleft(line)
def initialize_buffers(self):
if not self._log_initialized:
raise NFSException("Ganesha config location is not configured. "
"Please set the GANESHA_RADOS_POOL_NAMESPACE "
"setting.")
- location_list = [l.strip() for l in location_list_str.split(",")]
+ location_list = [loc.strip() for loc in location_list_str.split(",")]
for location in location_list:
cluster = None
pool = None