Commit e616cca
committed
move REPL execution paths to main_modes/repl.py
Motivation: move code out of the monolithic main.py into logical layers.
There is no functional change for this refactor, just the creation of
main_modes/repl.py and the migration of (some of) the REPL logic out of
main.py.
There is much more to do, just in relation to the REPL. For example,
complete_while_typing_filter() doesn't logically still belong in
main.py, but it is bound up with state set in main.py. Likewise, the
updates of the prompt string, and similar updates of window title and
toolbar, logically belong with the REPL, but are a bit interwoven with
other code in main.py.
Another desirable change might be migrating the handlers in
key_binding_utils.py to repl.py or some new file repl_handlers.py.
We might also consider now removing sections of the relatively brittle
tests in test_main_regression.py which relate to the REPL, and a note
is left to that effect.
run_cli() is left in place for now, but the intention is to fully
replace it with main_repl().1 parent deada76 commit e616cca
File tree
8 files changed
+1620
-690
lines changed- mycli
- main_modes
- test/pytests
8 files changed
+1620
-690
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Large diffs are not rendered by default.
0 commit comments