Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/jedi/inference/docstring_utils.py: 50%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

16 statements  

1from jedi.inference.value import ModuleValue 

2from jedi.inference.context import ModuleContext 

3 

4 

5class DocstringModule(ModuleValue): 

6 def __init__(self, in_module_context, **kwargs): 

7 super().__init__(**kwargs) 

8 self._in_module_context = in_module_context 

9 

10 def _as_context(self): 

11 return DocstringModuleContext(self, self._in_module_context) 

12 

13 

14class DocstringModuleContext(ModuleContext): 

15 def __init__(self, module_value, in_module_context): 

16 super().__init__(module_value) 

17 self._in_module_context = in_module_context 

18 

19 def get_filters(self, origin_scope=None, until_position=None): 

20 yield from super().get_filters(until_position=until_position) 

21 yield from self._in_module_context.get_filters()