mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
GeneratorBase -> GeneratorMixin
This commit is contained in:
@@ -46,7 +46,7 @@ class IterableMixin(object):
|
|||||||
return ContextSet([compiled.builtin_from_name(self.evaluator, u'None')])
|
return ContextSet([compiled.builtin_from_name(self.evaluator, u'None')])
|
||||||
|
|
||||||
|
|
||||||
class GeneratorBase(LazyAttributeOverwrite, IterableMixin):
|
class GeneratorMixin(LazyAttributeOverwrite, IterableMixin):
|
||||||
array_type = None
|
array_type = None
|
||||||
|
|
||||||
def _get_wrapped_context(self):
|
def _get_wrapped_context(self):
|
||||||
@@ -79,7 +79,7 @@ class GeneratorBase(LazyAttributeOverwrite, IterableMixin):
|
|||||||
return compiled.CompiledContextName(self, 'generator')
|
return compiled.CompiledContextName(self, 'generator')
|
||||||
|
|
||||||
|
|
||||||
class Generator(GeneratorBase):
|
class Generator(GeneratorMixin):
|
||||||
"""Handling of `yield` functions."""
|
"""Handling of `yield` functions."""
|
||||||
def __init__(self, evaluator, func_execution_context):
|
def __init__(self, evaluator, func_execution_context):
|
||||||
super(Generator, self).__init__(evaluator)
|
super(Generator, self).__init__(evaluator)
|
||||||
@@ -301,11 +301,11 @@ class DictComprehension(_DictMixin, ComprehensionMixin, Sequence):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
class GeneratorComprehension(ComprehensionMixin, GeneratorBase):
|
class GeneratorComprehension(ComprehensionMixin, GeneratorMixin):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ArgumentGeneratorComprehension(ComprehensionMixin, GeneratorBase):
|
class ArgumentGeneratorComprehension(ComprehensionMixin, GeneratorMixin):
|
||||||
def _get_comp_for(self):
|
def _get_comp_for(self):
|
||||||
# Not actually an atom. But need to correct this comprehension madness
|
# Not actually an atom. But need to correct this comprehension madness
|
||||||
# anyway.
|
# anyway.
|
||||||
|
|||||||
Reference in New Issue
Block a user