From 7bba12e8c5639ad2f1ebe9e77ba49fd76e198c20 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 3 Aug 2014 23:00:32 +0200 Subject: [PATCH] comments --- jedi/evaluate/dynamic.py | 5 +++++ jedi/evaluate/finder.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/jedi/evaluate/dynamic.py b/jedi/evaluate/dynamic.py index b57118b8..6818b827 100644 --- a/jedi/evaluate/dynamic.py +++ b/jedi/evaluate/dynamic.py @@ -99,6 +99,11 @@ def search_params(evaluator, param): pos = None from jedi.evaluate import representation as er for scope in scopes: + # Not resolving decorators is a speed hack: + # By ignoring them, we get the function that is + # probably called really fast. If it's not called, it + # doesn't matter. But this is a way to get potential + # candidates for calling that function really quick! s = evaluator.find_types(scope, func_name, position=pos, search_global=not first, resolve_decorator=False) diff --git a/jedi/evaluate/finder.py b/jedi/evaluate/finder.py index e363f391..2a542907 100644 --- a/jedi/evaluate/finder.py +++ b/jedi/evaluate/finder.py @@ -1,5 +1,5 @@ """ -Searcjing for names with given scope and name. This is very central in Jedi and +Searching for names with given scope and name. This is very central in Jedi and Python. The name resolution is quite complicated with descripter, ``__getattribute__``, ``__getattr__``, ``global``, etc.