diff options
| author | Mikhail Borisov <[email protected]> | 2022-02-10 16:45:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:39 +0300 |
| commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
| tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /contrib/python/ipython/py2/IPython/utils/generics.py | |
| parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
Restoring authorship annotation for Mikhail Borisov <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/utils/generics.py')
| -rw-r--r-- | contrib/python/ipython/py2/IPython/utils/generics.py | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/contrib/python/ipython/py2/IPython/utils/generics.py b/contrib/python/ipython/py2/IPython/utils/generics.py index 5ffdc86ebda..ff856a7e559 100644 --- a/contrib/python/ipython/py2/IPython/utils/generics.py +++ b/contrib/python/ipython/py2/IPython/utils/generics.py @@ -1,34 +1,34 @@ -# encoding: utf-8 -"""Generic functions for extending IPython. - -See http://pypi.python.org/pypi/simplegeneric. -""" - -from IPython.core.error import TryNext -from simplegeneric import generic - - -@generic -def inspect_object(obj): - """Called when you do obj?""" - raise TryNext - - -@generic -def complete_object(obj, prev_completions): - """Custom completer dispatching for python objects. - - Parameters - ---------- - obj : object - The object to complete. - prev_completions : list - List of attributes discovered so far. - - This should return the list of attributes in obj. If you only wish to - add to the attributes already discovered normally, return - own_attrs + prev_completions. - """ - raise TryNext - - +# encoding: utf-8 +"""Generic functions for extending IPython. + +See http://pypi.python.org/pypi/simplegeneric. +""" + +from IPython.core.error import TryNext +from simplegeneric import generic + + +@generic +def inspect_object(obj): + """Called when you do obj?""" + raise TryNext + + +@generic +def complete_object(obj, prev_completions): + """Custom completer dispatching for python objects. + + Parameters + ---------- + obj : object + The object to complete. + prev_completions : list + List of attributes discovered so far. + + This should return the list of attributes in obj. If you only wish to + add to the attributes already discovered normally, return + own_attrs + prev_completions. + """ + raise TryNext + + |
