Linting...
This commit is contained in:
parent
cb3a0ce4da
commit
bec53dbf1e
|
@ -1,7 +1,8 @@
|
|||
import curses
|
||||
from types import TracebackType
|
||||
|
||||
class TermManager():
|
||||
|
||||
|
||||
class TermManager:
|
||||
def __init__(self):
|
||||
self.screen = curses.initscr()
|
||||
# convert escapes sequences to curses abstraction
|
||||
|
@ -14,9 +15,10 @@ class TermManager():
|
|||
curses.curs_set(False)
|
||||
|
||||
def __enter__(self):
|
||||
return self.screen
|
||||
return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
def __exit__(self, exc_type: type, exc_value: Exception,
|
||||
exc_traceback: TracebackType) -> None:
|
||||
# restore the terminal to its original state
|
||||
self.screen.keypad(False)
|
||||
curses.echo()
|
Loading…
Reference in New Issue