def channel_history(self, call):
if isinstance(call.func, ast.Attribute):
if call.func.attr == 'logs_from':
if self.interactive and not prompt_change(
'A possible change was found to change logs_from to history.'
):
return call
dest = call.args[0]
call.args = call.args[1:]
if call.args:
limit = call.args[0]
call.keywords.append(ast.keyword(arg='limit', value=limit))
call.args = []
call.func.value = dest
call.func.attr = 'history'
stats_counter['call_changes'] += 1
return call
评论列表
文章目录