shell: Polish repl code
This clean up and move stuffs in order to simplify or to make stuff explicit.
- Fix typing
- No more mypy type error for
bliss.shell.cli
- Create a
BlissAppSession
to store more than what prompt toolkit stores- This could be reworked in the future
- No more mypy type error for
- Remove monkey patches
- The completer is now setup inside
BlissRepl
- The statusbars are still using monkey patching but setup at run time by
BlissRepl
- The completer is now setup inside
- Reorganize some code from
bliss.shell.cli
- Split a bit more what is about app and lib
- ... by creating a single class or function into a single module
- Split
repl.py
intobliss_repl.py
,bliss_app_session.py
,bliss_output.py
- Move
session_files_templates.py
intobliss.shell.main
- Create
config.py
to remove anything from__init__
- This module will probably grow up in the future to feature persistence
- Make sure the app session is properly propagated
- Drop
output
from the greenlet context and only useapp_session
- Drop
- The remaining code from
bliss.shell.cli.repl.py
is about the setup and bootstrap ofBlissRepl
- This could be reworked in the future to split a bit more what is about app and lib
Edited by Valentin Valls