From 8c663313de36e860bbfea0909de181d330bfdfc7 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Sun, 20 Apr 2008 11:49:35 +0000 Subject: ran reindent in preparation for the 1.1 release --- numpy/lib/utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy/lib/utils.py') diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index b02ba540f..3f7d22092 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -512,7 +512,7 @@ def lookfor(what, module=None, import_modules=True, regenerate=False): if not whats: return for name, (docstring, kind, index) in cache.iteritems(): - if kind in ('module', 'object'): + if kind in ('module', 'object'): # don't show modules or objects continue ok = True @@ -528,7 +528,7 @@ def lookfor(what, module=None, import_modules=True, regenerate=False): # XXX: this is full Harrison-Stetson heuristics now, # XXX: it probably could be improved - kind_relevance = {'func': 1000, 'class': 1000, + kind_relevance = {'func': 1000, 'class': 1000, 'module': -1000, 'object': -1000} def relevance(name, docstr, kind, index): @@ -597,7 +597,7 @@ def _lookfor_generate_cache(module, import_modules, regenerate): cache : dict {obj_full_name: (docstring, kind, index), ...} Docstring cache for the module, either cached one (regenerate=False) or newly generated. - + """ global _lookfor_caches @@ -623,7 +623,7 @@ def _lookfor_generate_cache(module, import_modules, regenerate): index += 1 kind = "object" - + if inspect.ismodule(item): kind = "module" try: @@ -649,13 +649,13 @@ def _lookfor_generate_cache(module, import_modules, regenerate): stack.append(("%s.%s" % (name, n), v)) elif callable(item): kind = "func" - + doc = inspect.getdoc(item) if doc is not None: cache[name] = (doc, kind, index) return cache - + #----------------------------------------------------------------------------- # The following SafeEval class and company are adapted from Michael Spencer's -- cgit v1.2.1