mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
refactor: ruff autofixes
This commit is contained in:
455 files changed
+12322
-14762
No files matched your search
@@ -114,7 +114,7 @@ class EmbedShell:
|
||||
if not cmd[0].strip():
|
||||
return ""
|
||||
|
||||
for (name, meth) in inspect.getmembers(self):
|
||||
for name, meth in inspect.getmembers(self):
|
||||
if name == cmd[0]:
|
||||
cmd.pop(0)
|
||||
res = await meth(*cmd)
|
||||
@@ -177,10 +177,10 @@ class UnstoppableEventLoop(EventLoop):
|
||||
self._loop = loop
|
||||
|
||||
def close(self):
|
||||
" Ignore. "
|
||||
"Ignore."
|
||||
|
||||
def stop(self):
|
||||
" Ignore. "
|
||||
"Ignore."
|
||||
|
||||
def run_in_executor(self, *args, **kwargs):
|
||||
return self._loop.run_in_executor(*args, **kwargs)
|
||||
@@ -264,18 +264,18 @@ class ShellConnection(TelnetConnection):
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
""" Resets terminal screen"""
|
||||
"""Resets terminal screen"""
|
||||
self._cli.reset()
|
||||
self._cli.buffers[DEFAULT_BUFFER].reset()
|
||||
self._cli.renderer.request_absolute_cursor_position()
|
||||
self._cli._redraw()
|
||||
|
||||
def write(self, data):
|
||||
""" Compat with CLI"""
|
||||
"""Compat with CLI"""
|
||||
self.send(data)
|
||||
|
||||
def flush(self):
|
||||
""" Compat with CLI"""
|
||||
"""Compat with CLI"""
|
||||
pass
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user