forked from VimPlug/jedi
Python3Method is not needed anymore in the parser.
This commit is contained in:
@@ -39,7 +39,6 @@ class Context(object):
|
|||||||
def eval_stmt(self, stmt, seek_name=None):
|
def eval_stmt(self, stmt, seek_name=None):
|
||||||
return self.evaluator.eval_statement(self, stmt, seek_name)
|
return self.evaluator.eval_statement(self, stmt, seek_name)
|
||||||
|
|
||||||
@Python3Method
|
|
||||||
def eval_trailer(self, types, trailer):
|
def eval_trailer(self, types, trailer):
|
||||||
return self.evaluator.eval_trailer(self, types, trailer)
|
return self.evaluator.eval_trailer(self, types, trailer)
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ from inspect import cleandoc
|
|||||||
from itertools import chain
|
from itertools import chain
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from jedi._compatibility import (Python3Method, is_py3, utf8_repr,
|
from jedi._compatibility import is_py3, utf8_repr, literal_eval, unicode
|
||||||
literal_eval, unicode)
|
|
||||||
from jedi.parser.tree import Node, BaseNode, Leaf, ErrorNode, ErrorLeaf
|
from jedi.parser.tree import Node, BaseNode, Leaf, ErrorNode, ErrorLeaf
|
||||||
|
|
||||||
|
|
||||||
@@ -138,7 +137,6 @@ class PythonMixin(object):
|
|||||||
# Default is not being a scope. Just inherit from Scope.
|
# Default is not being a scope. Just inherit from Scope.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@Python3Method
|
|
||||||
def name_for_position(self, position):
|
def name_for_position(self, position):
|
||||||
for c in self.children:
|
for c in self.children:
|
||||||
if isinstance(c, Leaf):
|
if isinstance(c, Leaf):
|
||||||
@@ -150,7 +148,6 @@ class PythonMixin(object):
|
|||||||
return result
|
return result
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@Python3Method
|
|
||||||
def get_statement_for_position(self, pos):
|
def get_statement_for_position(self, pos):
|
||||||
for c in self.children:
|
for c in self.children:
|
||||||
if c.start_pos <= pos <= c.end_pos:
|
if c.start_pos <= pos <= c.end_pos:
|
||||||
@@ -322,7 +319,6 @@ class Scope(PythonBaseNode, DocstringMixin):
|
|||||||
def imports(self):
|
def imports(self):
|
||||||
return self._search_in_scope(Import)
|
return self._search_in_scope(Import)
|
||||||
|
|
||||||
@Python3Method
|
|
||||||
def _search_in_scope(self, typ):
|
def _search_in_scope(self, typ):
|
||||||
def scan(children):
|
def scan(children):
|
||||||
elements = []
|
elements = []
|
||||||
|
|||||||
Reference in New Issue
Block a user