mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-20 11:38:26 +08:00
Api classes test fixes.
This commit is contained in:
@@ -62,7 +62,6 @@ that are not used are just being ignored.
|
||||
|
||||
import copy
|
||||
import sys
|
||||
from itertools import chain
|
||||
|
||||
from jedi.parser import tree
|
||||
from jedi import debug
|
||||
|
||||
@@ -166,7 +166,7 @@ class Generator(GeneratorMixin, context.Context):
|
||||
"""Handling of `yield` functions."""
|
||||
|
||||
def __init__(self, evaluator, func_execution_context):
|
||||
super(Generator, self).__init__(evaluator)
|
||||
super(Generator, self).__init__(evaluator, parent_context=evaluator.BUILTINS)
|
||||
self._func_execution_context = func_execution_context
|
||||
|
||||
def py__iter__(self):
|
||||
|
||||
@@ -538,7 +538,7 @@ class ModuleContext(use_metaclass(CachedMetaClass, context.TreeContext)):
|
||||
|
||||
def py__name__(self):
|
||||
for name, module in self.evaluator.modules.items():
|
||||
if module == self:
|
||||
if module == self and name != '':
|
||||
return name
|
||||
|
||||
return '__main__'
|
||||
|
||||
Reference in New Issue
Block a user