Esempio n. 1
0
File: module.py Progetto: Shieh/jedi
 def get_filters(self, search_global, until_position=None, origin_scope=None):
     yield ParserTreeFilter(
         self.evaluator,
         context=self,
         until_position=until_position,
         origin_scope=origin_scope
     )
     yield GlobalNameFilter(self, self.tree_node)
     yield DictFilter(self._sub_modules_dict())
     yield DictFilter(self._module_attributes_dict())
     for star_module in self.star_imports():
         yield next(star_module.get_filters(search_global))
Esempio n. 2
0
 def get_filters(self,
                 search_global=False,
                 until_position=None,
                 origin_scope=None):
     yield MergedFilter(
         ParserTreeFilter(self.evaluator,
                          context=self,
                          until_position=until_position,
                          origin_scope=origin_scope),
         GlobalNameFilter(self, self.tree_node),
     )
     yield DictFilter(self.sub_modules_dict())
     yield DictFilter(self._module_attributes_dict())
     for star_filter in self.iter_star_filters():
         yield star_filter
Esempio n. 3
0
 def get_filters(self, search_global=False, position=None, origin_scope=None):
     yield DictFilter(dict(
         name=compiled.create_simple_object(self.evaluator, self._name.string_name).name,
         value=self._name,
     ))
     for f in self._get_wrapped_context().get_filters():
         yield f
Esempio n. 4
0
 def wrapper(cls, metaclasses):
     for metaclass in metaclasses:
         if metaclass.py__name__() == 'EnumMeta' \
                 and metaclass.get_root_context().py__name__() == 'enum':
             filter_ = ParserTreeFilter(cls.evaluator, context=cls)
             return [DictFilter({
                 name.string_name: EnumInstance(cls, name).name for name in filter_.values()
             })]
     return func(cls, metaclasses)
 def get_filters(self,
                 search_global=False,
                 until_position=None,
                 origin_scope=None):
     yield DictFilter(self.sub_modules_dict())