Show More
@@ -5,6 +5,10 b' from IPython.terminal.interactiveshell import KeyBindingManager' | |||||
5 |
|
5 | |||
6 | def name(c): |
|
6 | def name(c): | |
7 | s = c.__class__.__name__ |
|
7 | s = c.__class__.__name__ | |
|
8 | if s == '_Invert': | |||
|
9 | return '(Not: %s)' % name(c.filter) | |||
|
10 | if s in log_filters.keys(): | |||
|
11 | return '(%s: %s)' % (log_filters[s], ', '.join(name(x) for x in c.filters)) | |||
8 | return log_filters[s] if s in log_filters.keys() else s |
|
12 | return log_filters[s] if s in log_filters.keys() else s | |
9 |
|
13 | |||
10 |
|
14 | |||
@@ -32,15 +36,11 b' def multi_filter_str(flt):' | |||||
32 | """Yield readable conditional filter |
|
36 | """Yield readable conditional filter | |
33 | """ |
|
37 | """ | |
34 | assert hasattr(flt, 'filters'), 'Conditional filter required' |
|
38 | assert hasattr(flt, 'filters'), 'Conditional filter required' | |
35 |
|
||||
36 | yield name(flt) |
|
39 | yield name(flt) | |
37 | for subfilter in flt.filters: |
|
|||
38 | yield name(subfilter) |
|
|||
39 | if hasattr(subfilter, 'filter'): |
|
|||
40 | yield name(subfilter.filter) |
|
|||
41 |
|
40 | |||
42 |
|
41 | |||
43 |
log_filters = dict(_AndList=' |
|
42 | log_filters = dict(_AndList='And', _OrList='Or') | |
|
43 | log_invert = {'_Invert'} | |||
44 |
|
44 | |||
45 | kbm = KeyBindingManager.for_prompt() |
|
45 | kbm = KeyBindingManager.for_prompt() | |
46 | ipy_bindings = kbm.registry.key_bindings |
|
46 | ipy_bindings = kbm.registry.key_bindings |
General Comments 0
You need to be logged in to leave comments.
Login now