mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-20 19:38:25 +08:00
Refactor Evaluator.wrap to use the types in a more consequent way.
This commit is contained in:
@@ -4,6 +4,7 @@ TODO Some parts of this module are still not well documented.
|
||||
import inspect
|
||||
import re
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from jedi._compatibility import builtins
|
||||
from jedi import debug
|
||||
@@ -31,7 +32,7 @@ class MixedModule(object):
|
||||
# Usually we are dealing with very small code sizes when it comes to
|
||||
# interpreter modules. In this case we just copy the whole syntax tree
|
||||
# to be able to modify it.
|
||||
self._parser_module = helpers.deep_ast_copy(parser_module)
|
||||
self._parser_module = copy.deepcopy(parser_module)
|
||||
|
||||
for child in self._parser_module.children:
|
||||
child.parent = self
|
||||
|
||||
@@ -67,6 +67,8 @@ keywords_only_valid_as_leaf = (
|
||||
|
||||
|
||||
class Keyword(object):
|
||||
type = 'completion_keyword'
|
||||
|
||||
def __init__(self, evaluator, name, pos):
|
||||
self.name = FakeName(name, self, pos)
|
||||
self.start_pos = pos
|
||||
|
||||
Reference in New Issue
Block a user