##// END OF EJS Templates
Merge pull request #11393 from hugovk/replace-simplegeneric...
Matthias Bussonnier -
r24716:6d9a28a2 merge
parent child Browse files
Show More
@@ -115,7 +115,7 b' def test_custom_completion_error():'
115 115 class A(object): pass
116 116 ip.user_ns['a'] = A()
117 117
118 @complete_object.when_type(A)
118 @complete_object.register(A)
119 119 def complete_A(a, existing_completions):
120 120 raise TypeError("this should be silenced")
121 121
@@ -2,4 +2,4 b''
2 2 This package contains all third-party modules bundled with IPython.
3 3 """
4 4
5 __all__ = ["simplegeneric"]
5 __all__ = []
@@ -1,20 +1,18 b''
1 1 # encoding: utf-8
2 2 """Generic functions for extending IPython.
3
4 See http://pypi.python.org/pypi/simplegeneric.
5 3 """
6 4
7 5 from IPython.core.error import TryNext
8 from simplegeneric import generic
6 from functools import singledispatch
9 7
10 8
11 @generic
9 @singledispatch
12 10 def inspect_object(obj):
13 11 """Called when you do obj?"""
14 12 raise TryNext
15 13
16 14
17 @generic
15 @singledispatch
18 16 def complete_object(obj, prev_completions):
19 17 """Custom completer dispatching for python objects.
20 18
@@ -30,5 +28,3 b' def complete_object(obj, prev_completions):'
30 28 own_attrs + prev_completions.
31 29 """
32 30 raise TryNext
33
34
@@ -81,7 +81,7 b' class LSString(str):'
81 81 # print arg
82 82 #
83 83 #
84 # print_lsstring = result_display.when_type(LSString)(print_lsstring)
84 # print_lsstring = result_display.register(LSString)(print_lsstring)
85 85
86 86
87 87 class SList(list):
@@ -243,7 +243,7 b' class SList(list):'
243 243 #
244 244 # nlprint(arg) # This was a nested list printer, now removed.
245 245 #
246 # print_slist = result_display.when_type(SList)(print_slist)
246 # print_slist = result_display.register(SList)(print_slist)
247 247
248 248
249 249 def indent(instr,nspaces=4, ntabs=0, flatten=False):
@@ -188,7 +188,6 b' install_requires = ['
188 188 'jedi>=0.10',
189 189 'decorator',
190 190 'pickleshare',
191 'simplegeneric>0.8',
192 191 'traitlets>=4.2',
193 192 'prompt_toolkit>=2.0.0,<2.1.0',
194 193 'pygments',
General Comments 0
You need to be logged in to leave comments. Login now