diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index d17ce42..b09da9b 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -59,17 +59,17 @@ def full_path(startPath,files): """Make full paths for all the listed files, based on startPath. Only the base part of startPath is kept, since this routine is typically - used with a script's __file__ variable as startPath. The base of startPath + used with a script's ``__file__`` variable as startPath. The base of startPath is then prepended to all the listed files, forming the output list. Parameters ---------- - startPath : string - Initial path to use as the base for the results. This path is split + startPath : string + Initial path to use as the base for the results. This path is split using os.path.split() and only its first component is kept. - files : string or list - One or more files. + files : string or list + One or more files. Examples -------- @@ -80,9 +80,10 @@ def full_path(startPath,files): >>> full_path('/foo',['a.txt','b.txt']) ['/a.txt', '/b.txt'] - If a single file is given, the output is still a list: - >>> full_path('/foo','a.txt') - ['/a.txt'] + If a single file is given, the output is still a list:: + + >>> full_path('/foo','a.txt') + ['/a.txt'] """ files = list_strings(files) @@ -105,7 +106,8 @@ def parse_test_output(txt): Returns ------- - nerr, nfail: number of errors and failures. + nerr, nfail + number of errors and failures. """ err_m = re.search(r'^FAILED \(errors=(\d+)\)', txt, re.MULTILINE) diff --git a/IPython/utils/coloransi.py b/IPython/utils/coloransi.py index acac3a3..b879f7c 100644 --- a/IPython/utils/coloransi.py +++ b/IPython/utils/coloransi.py @@ -48,8 +48,9 @@ color_templates = ( def make_color_table(in_class): """Build a set of color attributes in a class. - Helper function for building the *TermColors classes.""" - + Helper function for building the :class:`TermColors` and + :class`InputTermColors`. + """ for name,value in color_templates: setattr(in_class,name,in_class._base % value) diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 71d5e93..2eb6580 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -110,10 +110,10 @@ class SList(list): These are normal lists, but with the special attributes: - .l (or .list) : value as list (the list itself). - .n (or .nlstr): value as a string, joined on newlines. - .s (or .spstr): value as a string, joined on spaces. - .p (or .paths): list of path objects + * .l (or .list) : value as list (the list itself). + * .n (or .nlstr): value as a string, joined on newlines. + * .s (or .spstr): value as a string, joined on spaces. + * .p (or .paths): list of path objects Any values which require transformations are computed only once and cached.""" @@ -191,13 +191,14 @@ class SList(list): Allows quick awk-like usage of string lists. Example data (in var a, created by 'a = !ls -l'):: + -rwxrwxrwx 1 ville None 18 Dec 14 2006 ChangeLog drwxrwxrwx+ 6 ville None 0 Oct 24 18:05 IPython - a.fields(0) is ['-rwxrwxrwx', 'drwxrwxrwx+'] - a.fields(1,0) is ['1 -rwxrwxrwx', '6 drwxrwxrwx+'] - (note the joining by space). - a.fields(-1) is ['ChangeLog', 'IPython'] + * ``a.fields(0)`` is ``['-rwxrwxrwx', 'drwxrwxrwx+']`` + * ``a.fields(1,0)`` is ``['1 -rwxrwxrwx', '6 drwxrwxrwx+']`` + (note the joining by space). + * ``a.fields(-1)`` is ``['ChangeLog', 'IPython']`` IndexErrors are ignored. diff --git a/docs/autogen_api.py b/docs/autogen_api.py index 71c6285..ee2ba66 100755 --- a/docs/autogen_api.py +++ b/docs/autogen_api.py @@ -28,6 +28,7 @@ if __name__ == '__main__': # main API is in the inputhook module, which is documented. docwriter.module_skip_patterns += [ r'\.lib\.inputhook.+', r'\.ipdoctest', + r'\.testing\.plugin', # This just prints a deprecation msg: r'\.frontend', ]