/opt/imh-python/lib/python3.9/site-packages/jedi
NameSizeModeActions
api/-0755rm
inference/-0755rm
plugins/-0755rm
third_party/-0755rm
__pycache__/-0755rm
cache.py36740644editdlrm
common.py6680644editdlrm
debug.py35040644editdlrm
file_io.py23370644editdlrm
parser_utils.py110000644editdlrm
settings.py38270644editdlrm
utils.py46800644editdlrm
_compatibility.py14910644editdlrm
__init__.py14860644editdlrm
__main__.py19500644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/jedi/common.py (668B)
from contextlib import contextmanager @contextmanager def monkeypatch(obj, attribute_name, new_value): """ Like pytest's monkeypatch, but as a value manager. """ old_value = getattr(obj, attribute_name) try: setattr(obj, attribute_name, new_value) yield finally: setattr(obj, attribute_name, old_value) def indent_block(text, indention=' '): """This function indents a text block with a default of four spaces.""" temp = '' while text and text[-1] == '\n': temp += text[-1] text = text[:-1] lines = text.split('\n') return '\n'.join(map(lambda s: indention + s, lines)) + temp