ipython 8.33.0__tar.gz → 8.35.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/completer.py +155 -3
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/release.py +1 -1
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_completer.py +119 -1
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/interactiveshell.py +54 -10
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/qt.py +3 -1
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/shortcuts/__init__.py +1 -1
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/shortcuts/auto_suggest.py +21 -15
- ipython-8.35.0/IPython/terminal/tests/fake_llm.py +89 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_shortcuts.py +24 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_sysinfo.py +1 -1
- {ipython-8.33.0/ipython.egg-info → ipython-8.35.0}/PKG-INFO +4 -2
- ipython-8.35.0/docs/source/api/generated/IPython.conftest.rst +28 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.alias.rst +36 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.application.rst +20 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.async_helpers.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.autocall.rst +24 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.builtin_trap.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.compilerop.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.completer.rst +107 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.completerlib.rst +43 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.crashhandler.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.debugger.rst +35 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.doctb.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.error.rst +30 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.events.rst +34 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.excolors.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.extensions.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.formatters.rst +83 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.getipython.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.guarded_eval.rst +31 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.history.rst +59 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.historyapp.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.hooks.rst +31 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.inputsplitter.rst +58 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.inputtransformer.rst +74 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.inputtransformer2.rst +85 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.interactiveshell.rst +56 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.logger.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.macro.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magic.rst +59 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magic_arguments.rst +62 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.ast_mod.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.auto.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.basic.rst +24 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.code.rst +38 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.display.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.execution.rst +38 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.extension.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.history.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.logging.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.namespace.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.osm.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.packaging.rst +20 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.pylab.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.magics.script.rst +26 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.oinspect.rst +52 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.page.rst +37 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.payload.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.payloadpage.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.prefilter.rst +88 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.profileapp.rst +35 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.profiledir.rst +18 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.prompts.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.pylabtools.rst +37 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.shellapp.rst +20 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.splitinput.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.tbtools.rst +40 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.tips.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.core.ultratb.rst +42 -0
- ipython-8.35.0/docs/source/api/generated/IPython.display.rst +181 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.backgroundjobs.rst +34 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.clipboard.rst +29 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.deepreload.rst +37 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.demo.rst +53 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.editorhooks.rst +43 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.guisupport.rst +28 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.latextools.rst +35 -0
- ipython-8.35.0/docs/source/api/generated/IPython.lib.pretty.rst +83 -0
- ipython-8.35.0/docs/source/api/generated/IPython.paths.rst +25 -0
- ipython-8.35.0/docs/source/api/generated/IPython.rst +19 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.debugger.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.embed.rst +30 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.interactiveshell.rst +34 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.ipapp.rst +30 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.magics.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.prompts.rst +24 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.shortcuts.auto_match.rst +46 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.shortcuts.auto_suggest.rst +67 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.shortcuts.filters.rst +58 -0
- ipython-8.35.0/docs/source/api/generated/IPython.terminal.shortcuts.rst +49 -0
- ipython-8.35.0/docs/source/api/generated/IPython.testing.decorators.rst +25 -0
- ipython-8.35.0/docs/source/api/generated/IPython.testing.globalipapp.rst +19 -0
- ipython-8.35.0/docs/source/api/generated/IPython.testing.ipunittest.rst +31 -0
- ipython-8.35.0/docs/source/api/generated/IPython.testing.skipdoctest.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.testing.tools.rst +60 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.PyColorize.rst +26 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.capture.rst +28 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.colorable.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.coloransi.rst +14 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.contexts.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.data.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.decorators.rst +19 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.dir2.rst +19 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.encoding.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.frame.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.generics.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.importstring.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.io.rst +25 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.ipstruct.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.module_paths.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.openpy.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.path.rst +56 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.process.rst +23 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.sentinel.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.shimmodule.rst +26 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.strdispatch.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.sysinfo.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.syspathcontext.rst +16 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.tempdir.rst +20 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.terminal.rst +22 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.text.rst +54 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.timing.rst +31 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.tokenutil.rst +29 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.tz.rst +20 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.ulinecache.rst +13 -0
- ipython-8.35.0/docs/source/api/generated/IPython.utils.wildcard.rst +28 -0
- ipython-8.35.0/docs/source/api/generated/gen.txt +122 -0
- ipython-8.35.0/docs/source/config/options/terminal.rst +2016 -0
- ipython-8.35.0/docs/source/config/shortcuts/table.tsv +79 -0
- ipython-8.35.0/docs/source/interactive/magics-generated.txt +2483 -0
- ipython-8.35.0/docs/source/savefig/hist_simple.png +0 -0
- ipython-8.35.0/docs/source/savefig/hist_with_text.png +0 -0
- ipython-8.35.0/docs/source/savefig/plot_simple.png +0 -0
- ipython-8.35.0/docs/source/savefig/plot_simple_python.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version8.rst +37 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Capturing Output.ipynb +1 -1
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Custom Display Logic.ipynb +1 -1
- ipython-8.35.0/examples/IPython Kernel/nbpackage/nbs/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/auto_suggest_llm.py +30 -3
- {ipython-8.33.0 → ipython-8.35.0/ipython.egg-info}/PKG-INFO +4 -2
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/SOURCES.txt +126 -0
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/requires.txt +1 -0
- {ipython-8.33.0 → ipython-8.35.0}/pyproject.toml +1 -0
- {ipython-8.33.0 → ipython-8.35.0}/.flake8 +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/.mailmap +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/.pre-commit-config.yaml +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/COPYING.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/__main__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/conftest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/consoleapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/alias.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/application.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/async_helpers.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/autocall.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/builtin_trap.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/compilerop.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/completerlib.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/crashhandler.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/debugger.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/display_functions.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/display_trap.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/displayhook.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/displaypub.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/error.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/events.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/excolors.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/extensions.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/formatters.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/getipython.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/guarded_eval.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/history.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/historyapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/hooks.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/inputsplitter.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/inputtransformer.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/inputtransformer2.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/interactiveshell.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/latex_symbols.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/logger.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/macro.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magic_arguments.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/ast_mod.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/auto.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/basic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/code.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/config.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/execution.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/extension.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/history.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/logging.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/namespace.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/osm.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/packaging.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/pylab.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/magics/script.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/oinspect.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/page.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/payload.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/payloadpage.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/prefilter.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/profile/README_STARTUP +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/profileapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/profiledir.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/prompts.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/pylabtools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/shellapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/splitinput.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/2x2.jpg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/2x2.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/bad_all.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/daft_extension/daft_extension.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/nonascii.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/nonascii2.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/print_argv.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/refbug.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/simpleerr.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/tclass.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_alias.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_application.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_async_helpers.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_autocall.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_compilerop.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_completerlib.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_debugger.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_displayhook.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_events.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_exceptiongroup_tb.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_extension.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_formatters.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_guarded_eval.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_handlers.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_history.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_hooks.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_imports.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_inputsplitter.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_inputtransformer.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_inputtransformer2.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_inputtransformer2_line.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_interactiveshell.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_iplib.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_logger.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_magic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_magic_arguments.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_magic_terminal.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_oinspect.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_page.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_paths.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_prefilter.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_profile.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_prompts.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_pylabtools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_run.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_shellapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_splitinput.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/tests/test_ultratb.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/ultratb.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/core/usage.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/autoreload.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/storemagic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/tests/test_autoreload.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/extensions/tests/test_storemagic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/external/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/external/qt_for_kernel.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/external/qt_loaders.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/external/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/external/tests/test_qt_loaders.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/backgroundjobs.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/clipboard.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/deepreload.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/demo.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/editorhooks.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/guisupport.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/latextools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/lexers.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/pretty.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test.wav +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_backgroundjobs.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_clipboard.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_deepreload.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_display.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_editorhooks.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_imports.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_latextools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_lexers.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_pretty.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/lib/tests/test_pygments.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/paths.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/py.typed +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/sphinxext/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/sphinxext/custom_doctests.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/sphinxext/ipython_console_highlighting.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/sphinxext/ipython_directive.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/console.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/debugger.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/embed.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/ipapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/magics.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/prompts.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/asyncio.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/glut.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/gtk.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/gtk3.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/gtk4.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/osx.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/pyglet.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/tk.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/pt_inputhooks/wx.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/ptutils.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/shortcuts/auto_match.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/shortcuts/filters.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_debug_magic.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_embed.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_help.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_interactivshell.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/terminal/tests/test_pt_inputhooks.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/decorators.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/globalipapp.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/ipunittest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/Makefile +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/README.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/dtexample.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/ipdoctest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/pytest_ipdoctest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/setup.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/simple.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/simplevars.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/test_combo.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/test_example.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/test_exampleip.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/test_ipdoctest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/plugin/test_refs.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/skipdoctest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/tests/test_decorators.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/tests/test_ipunittest.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/tests/test_tools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/testing/tools.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/tests/cve.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/PyColorize.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_cli.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_common.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_emscripten.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_posix.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_win32.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/_process_win32_controller.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/capture.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/colorable.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/coloransi.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/contexts.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/daemonize.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/data.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/decorators.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/dir2.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/docs.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/encoding.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/eventful.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/frame.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/generics.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/importstring.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/io.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/ipstruct.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/jsonutil.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/localinterfaces.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/log.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/module_paths.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/openpy.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/path.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/process.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/py3compat.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/sentinel.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/shimmodule.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/signatures.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/strdispatch.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/sysinfo.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/syspathcontext.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tempdir.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/terminal.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_capture.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_decorators.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_deprecated.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_dir2.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_imports.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_importstring.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_io.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_module_paths.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_openpy.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_path.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_process.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_pycolorize.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_shimmodule.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_sysinfo.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_tempdir.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_text.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_tokenutil.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tests/test_wildcard.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/text.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/timing.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tokenutil.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/traitlets.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/tz.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/ulinecache.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/version.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/IPython/utils/wildcard.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/LICENSE +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/MANIFEST.in +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/README.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/_build_meta.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/Makefile +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/README.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/autogen_api.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/autogen_config.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/autogen_magics.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/autogen_shortcuts.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/make.cmd +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/man/ipython.1 +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/requirements.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/2.0/running-crop.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/2.0/running.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/2.0/treeview.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/2.0/user-interface.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/2.0/widgets.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_1_prompt_no_text.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_2_print_hello_suggest.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_3_print_hello_suggest.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_4_print_hello.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_d_completions.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_d_phantom.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_def_completions.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_def_phantom.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_match_parens.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/auto_suggest_second_prompt.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/8.0/pathlib_pathlib_everywhere.jpg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/autosuggest.gif +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_dashboard.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_dashboard_cluster.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_cythonmagic.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_long_out.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_octavemagic.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_rmagic.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_script_cells.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_spectrogram.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_notebook_tooltip.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_par_tb.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_qtconsole_baboon.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipy_013_qtconsole_completer.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ipython-6-screenshot.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/jedi_type_inference_60.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/kernel_selector_screenshot.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ms_visual_studio.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/notebook_specgram.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/ptshell_features.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/qtconsole.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/qtconsole_tabbed.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_images/unicode_completion.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_static/favicon.ico +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_static/logo.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_static/theme_overrides.css +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_templates/breadcrumbs.html +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/_templates/notebook_redirect.html +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/about/history.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/about/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/about/license_and_copyright.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/api/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/conf.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/callbacks.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/custommagics.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/details.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/eventloops.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/extensions/autoreload.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/extensions/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/extensions/storemagic.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/inputtransforms.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/integrating.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/intro.rst +0 -0
- /ipython-8.33.0/examples/IPython Kernel/nbpackage/__init__.py → /ipython-8.35.0/docs/source/config/options/config-generated.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/options/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/shell_mimerenderer.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/config/shortcuts/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/coredev/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/config.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/execution.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/figs/ipy_kernel_and_terminal.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/figs/ipy_kernel_and_terminal.svg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/figs/other_kernels.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/figs/other_kernels.svg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/how_ipython_works.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/inputhook_app.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/kernels.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/lexer.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/messaging.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/pycompat.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/development/wrapperkernels.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/install/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/install/install.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/install/kernel_install.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/autoawait.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/figs/besselj.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/figs/colors_dark.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/figs/jn.html +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/figs/jn.xhtml +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/magics.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/plotting.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/python-ipython-diff.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/reference.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/shell.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/tips.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/interactive/tutorial.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/links.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/overview.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/parallel/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/sphinx.toml +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/sphinxext.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/development.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-0.11.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-0.12.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-0.13.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-1.0.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-2.0.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-3.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-4.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-5.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-6.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-7.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/github-stats-8.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/index.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/pr/README.md +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/pr/antigravity-feature.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/pr/incompat-switching-to-perl.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.10.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.11.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.12.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.13.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.8.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version0.9.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version1.0.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version2.0.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version3.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version3_widget_migration.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version4.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version5.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version6.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/source/whatsnew/version7.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/sphinxext/apigen.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/sphinxext/configtraits.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/sphinxext/github.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/docs/sphinxext/magics.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Embedding/Index.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Embedding/embed_class_long.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Embedding/embed_class_short.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Embedding/embed_function.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Embedding/start_ipython_config.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Animations Using clear_output.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Background Jobs.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Beyond Plain Python.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Cell Magics.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Importing Notebooks.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Index.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Plotting in the Notebook.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Raw Input in the Notebook.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Rich Output.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Script Magics.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/SymPy.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Terminal Usage.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Third Party Rich Output.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Trapezoid Rule.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Updating Displays.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/Working With External Code.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/data/flare.json +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/example-demo.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/gui/gui-glut.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/gui/gui-gtk4.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/gui/gui-qt.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/ipython-completion.bash +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/ipython-get-history.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/ipython.desktop +0 -0
- {ipython-8.33.0/examples/IPython Kernel/nbpackage/nbs → ipython-8.35.0/examples/IPython Kernel/nbpackage}/__init__.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/nbpackage/mynotebook.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/IPython Kernel/nbpackage/nbs/other.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/Index.ipynb +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/FrontendKernel.graffle/data.plist +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/FrontendKernel.graffle/image1.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/FrontendKernel.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/animation.m4v +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/ipython_logo.png +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/images/python_logo.svg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/utils/cwd_prompt.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/utils/list_pyfiles.ipy +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/examples/utils/list_subdirs.ipy +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/dependency_links.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/entry_points.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/not-zip-safe +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/ipython.egg-info/top_level.txt +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/long_description.rst +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/scripts/ipython.ico +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/scripts/ipython_nb.ico +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/setup.cfg +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/setup.py +0 -0
- {ipython-8.33.0 → ipython-8.35.0}/setupbase.py +0 -0
|
@@ -1148,7 +1148,7 @@ class Completer(Configurable):
|
|
|
1148
1148
|
def _attr_matches(
|
|
1149
1149
|
self, text: str, include_prefix: bool = True
|
|
1150
1150
|
) -> Tuple[Sequence[str], str]:
|
|
1151
|
-
m2 = self._ATTR_MATCH_RE.match(
|
|
1151
|
+
m2 = self._ATTR_MATCH_RE.match(text)
|
|
1152
1152
|
if not m2:
|
|
1153
1153
|
return [], ""
|
|
1154
1154
|
expr, attr = m2.group(1, 2)
|
|
@@ -2356,11 +2356,163 @@ class IPCompleter(Completer):
|
|
|
2356
2356
|
else:
|
|
2357
2357
|
return iter([])
|
|
2358
2358
|
|
|
2359
|
+
class _CompletionContextType(enum.Enum):
|
|
2360
|
+
ATTRIBUTE = "attribute" # For attribute completion
|
|
2361
|
+
GLOBAL = "global" # For global completion
|
|
2362
|
+
|
|
2363
|
+
def _determine_completion_context(self, line):
|
|
2364
|
+
"""
|
|
2365
|
+
Determine whether the cursor is in an attribute or global completion context.
|
|
2366
|
+
"""
|
|
2367
|
+
# Cursor in string/comment → GLOBAL.
|
|
2368
|
+
is_string, is_in_expression = self._is_in_string_or_comment(line)
|
|
2369
|
+
if is_string and not is_in_expression:
|
|
2370
|
+
return self._CompletionContextType.GLOBAL
|
|
2371
|
+
|
|
2372
|
+
# If we're in a template string expression, handle specially
|
|
2373
|
+
if is_string and is_in_expression:
|
|
2374
|
+
# Extract the expression part - look for the last { that isn't closed
|
|
2375
|
+
expr_start = line.rfind("{")
|
|
2376
|
+
if expr_start >= 0:
|
|
2377
|
+
# We're looking at the expression inside a template string
|
|
2378
|
+
expr = line[expr_start + 1 :]
|
|
2379
|
+
# Recursively determine the context of the expression
|
|
2380
|
+
return self._determine_completion_context(expr)
|
|
2381
|
+
|
|
2382
|
+
# Handle plain number literals - should be global context
|
|
2383
|
+
# Ex: 3. -42.14 but not 3.1.
|
|
2384
|
+
if re.search(r"(?<!\w)(?<!\d\.)([-+]?\d+\.(\d+)?)(?!\w)$", line):
|
|
2385
|
+
return self._CompletionContextType.GLOBAL
|
|
2386
|
+
|
|
2387
|
+
# Handle all other attribute matches np.ran, d[0].k, (a,b).count
|
|
2388
|
+
chain_match = re.search(r".*(.+\.(?:[a-zA-Z]\w*)?)$", line)
|
|
2389
|
+
if chain_match:
|
|
2390
|
+
return self._CompletionContextType.ATTRIBUTE
|
|
2391
|
+
|
|
2392
|
+
return self._CompletionContextType.GLOBAL
|
|
2393
|
+
|
|
2394
|
+
def _is_in_string_or_comment(self, text):
|
|
2395
|
+
"""
|
|
2396
|
+
Determine if the cursor is inside a string or comment.
|
|
2397
|
+
Returns (is_string, is_in_expression) tuple:
|
|
2398
|
+
- is_string: True if in any kind of string
|
|
2399
|
+
- is_in_expression: True if inside an f-string/t-string expression
|
|
2400
|
+
"""
|
|
2401
|
+
in_single_quote = False
|
|
2402
|
+
in_double_quote = False
|
|
2403
|
+
in_triple_single = False
|
|
2404
|
+
in_triple_double = False
|
|
2405
|
+
in_template_string = False # Covers both f-strings and t-strings
|
|
2406
|
+
in_expression = False # For expressions in f/t-strings
|
|
2407
|
+
expression_depth = 0 # Track nested braces in expressions
|
|
2408
|
+
i = 0
|
|
2409
|
+
|
|
2410
|
+
while i < len(text):
|
|
2411
|
+
# Check for f-string or t-string start
|
|
2412
|
+
if (
|
|
2413
|
+
i + 1 < len(text)
|
|
2414
|
+
and text[i] in ("f", "t")
|
|
2415
|
+
and (text[i + 1] == '"' or text[i + 1] == "'")
|
|
2416
|
+
and not (
|
|
2417
|
+
in_single_quote
|
|
2418
|
+
or in_double_quote
|
|
2419
|
+
or in_triple_single
|
|
2420
|
+
or in_triple_double
|
|
2421
|
+
)
|
|
2422
|
+
):
|
|
2423
|
+
in_template_string = True
|
|
2424
|
+
i += 1 # Skip the 'f' or 't'
|
|
2425
|
+
|
|
2426
|
+
# Handle triple quotes
|
|
2427
|
+
if i + 2 < len(text):
|
|
2428
|
+
if (
|
|
2429
|
+
text[i : i + 3] == '"""'
|
|
2430
|
+
and not in_single_quote
|
|
2431
|
+
and not in_triple_single
|
|
2432
|
+
):
|
|
2433
|
+
in_triple_double = not in_triple_double
|
|
2434
|
+
if not in_triple_double:
|
|
2435
|
+
in_template_string = False
|
|
2436
|
+
i += 3
|
|
2437
|
+
continue
|
|
2438
|
+
if (
|
|
2439
|
+
text[i : i + 3] == "'''"
|
|
2440
|
+
and not in_double_quote
|
|
2441
|
+
and not in_triple_double
|
|
2442
|
+
):
|
|
2443
|
+
in_triple_single = not in_triple_single
|
|
2444
|
+
if not in_triple_single:
|
|
2445
|
+
in_template_string = False
|
|
2446
|
+
i += 3
|
|
2447
|
+
continue
|
|
2448
|
+
|
|
2449
|
+
# Handle escapes
|
|
2450
|
+
if text[i] == "\\" and i + 1 < len(text):
|
|
2451
|
+
i += 2
|
|
2452
|
+
continue
|
|
2453
|
+
|
|
2454
|
+
# Handle nested braces within f-strings
|
|
2455
|
+
if in_template_string:
|
|
2456
|
+
# Special handling for consecutive opening braces
|
|
2457
|
+
if i + 1 < len(text) and text[i : i + 2] == "{{":
|
|
2458
|
+
i += 2
|
|
2459
|
+
continue
|
|
2460
|
+
|
|
2461
|
+
# Detect start of an expression
|
|
2462
|
+
if text[i] == "{":
|
|
2463
|
+
# Only increment depth and mark as expression if not already in an expression
|
|
2464
|
+
# or if we're at a top-level nested brace
|
|
2465
|
+
if not in_expression or (in_expression and expression_depth == 0):
|
|
2466
|
+
in_expression = True
|
|
2467
|
+
expression_depth += 1
|
|
2468
|
+
i += 1
|
|
2469
|
+
continue
|
|
2470
|
+
|
|
2471
|
+
# Detect end of an expression
|
|
2472
|
+
if text[i] == "}":
|
|
2473
|
+
expression_depth -= 1
|
|
2474
|
+
if expression_depth <= 0:
|
|
2475
|
+
in_expression = False
|
|
2476
|
+
expression_depth = 0
|
|
2477
|
+
i += 1
|
|
2478
|
+
continue
|
|
2479
|
+
|
|
2480
|
+
in_triple_quote = in_triple_single or in_triple_double
|
|
2481
|
+
|
|
2482
|
+
# Handle quotes - also reset template string when closing quotes are encountered
|
|
2483
|
+
if text[i] == '"' and not in_single_quote and not in_triple_quote:
|
|
2484
|
+
in_double_quote = not in_double_quote
|
|
2485
|
+
if not in_double_quote and not in_triple_quote:
|
|
2486
|
+
in_template_string = False
|
|
2487
|
+
elif text[i] == "'" and not in_double_quote and not in_triple_quote:
|
|
2488
|
+
in_single_quote = not in_single_quote
|
|
2489
|
+
if not in_single_quote and not in_triple_quote:
|
|
2490
|
+
in_template_string = False
|
|
2491
|
+
|
|
2492
|
+
# Check for comment
|
|
2493
|
+
if text[i] == "#" and not (
|
|
2494
|
+
in_single_quote or in_double_quote or in_triple_quote
|
|
2495
|
+
):
|
|
2496
|
+
return True, False
|
|
2497
|
+
|
|
2498
|
+
i += 1
|
|
2499
|
+
|
|
2500
|
+
is_string = (
|
|
2501
|
+
in_single_quote or in_double_quote or in_triple_single or in_triple_double
|
|
2502
|
+
)
|
|
2503
|
+
|
|
2504
|
+
# Return tuple (is_string, is_in_expression)
|
|
2505
|
+
return (
|
|
2506
|
+
is_string or (in_template_string and not in_expression),
|
|
2507
|
+
in_expression and expression_depth > 0,
|
|
2508
|
+
)
|
|
2509
|
+
|
|
2359
2510
|
@context_matcher()
|
|
2360
2511
|
def python_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
|
|
2361
2512
|
"""Match attributes or global python names"""
|
|
2362
|
-
text = context.
|
|
2363
|
-
|
|
2513
|
+
text = context.text_until_cursor
|
|
2514
|
+
completion_type = self._determine_completion_context(text)
|
|
2515
|
+
if completion_type == self._CompletionContextType.ATTRIBUTE:
|
|
2364
2516
|
try:
|
|
2365
2517
|
matches, fragment = self._attr_matches(text, include_prefix=False)
|
|
2366
2518
|
if text.endswith(".") and self.omit__names:
|
|
@@ -625,7 +625,6 @@ class TestCompleter(unittest.TestCase):
|
|
|
625
625
|
"Should have completed on a[0].r: %s",
|
|
626
626
|
Completion(5, 6, "real"),
|
|
627
627
|
)
|
|
628
|
-
|
|
629
628
|
_(
|
|
630
629
|
"a[0].from_",
|
|
631
630
|
10,
|
|
@@ -745,6 +744,46 @@ class TestCompleter(unittest.TestCase):
|
|
|
745
744
|
words = completer.get__all__entries(A())
|
|
746
745
|
self.assertEqual(words, [])
|
|
747
746
|
|
|
747
|
+
def test_completes_globals_as_args_of_methods(self):
|
|
748
|
+
ip = get_ipython()
|
|
749
|
+
c = ip.Completer
|
|
750
|
+
c.use_jedi = False
|
|
751
|
+
ip.ex("long_variable_name = 1")
|
|
752
|
+
ip.ex("a = []")
|
|
753
|
+
s, matches = c.complete(None, "a.sort(lo")
|
|
754
|
+
self.assertIn("long_variable_name", matches)
|
|
755
|
+
|
|
756
|
+
def test_completes_attributes_in_fstring_expressions(self):
|
|
757
|
+
ip = get_ipython()
|
|
758
|
+
c = ip.Completer
|
|
759
|
+
c.use_jedi = False
|
|
760
|
+
|
|
761
|
+
class CustomClass:
|
|
762
|
+
def method_one(self):
|
|
763
|
+
pass
|
|
764
|
+
|
|
765
|
+
ip.user_ns["custom_obj"] = CustomClass()
|
|
766
|
+
|
|
767
|
+
# Test completion inside f-string expressions
|
|
768
|
+
s, matches = c.complete(None, "f'{custom_obj.meth")
|
|
769
|
+
self.assertIn(".method_one", matches)
|
|
770
|
+
|
|
771
|
+
def test_completes_in_dict_expressions(self):
|
|
772
|
+
ip = get_ipython()
|
|
773
|
+
c = ip.Completer
|
|
774
|
+
c.use_jedi = False
|
|
775
|
+
ip.ex("class Test: pass")
|
|
776
|
+
ip.ex("test_obj = Test()")
|
|
777
|
+
ip.ex("test_obj.attribute = 'value'")
|
|
778
|
+
|
|
779
|
+
# Test completion in dictionary expressions
|
|
780
|
+
s, matches = c.complete(None, "d = {'key': test_obj.attr")
|
|
781
|
+
self.assertIn(".attribute", matches)
|
|
782
|
+
|
|
783
|
+
# Test global completion in dictionary expressions with dots
|
|
784
|
+
s, matches = c.complete(None, "d = {'k.e.y': Te")
|
|
785
|
+
self.assertIn("Test", matches)
|
|
786
|
+
|
|
748
787
|
def test_func_kw_completions(self):
|
|
749
788
|
ip = get_ipython()
|
|
750
789
|
c = ip.Completer
|
|
@@ -1745,6 +1784,85 @@ class TestCompleter(unittest.TestCase):
|
|
|
1745
1784
|
_(["completion_a"])
|
|
1746
1785
|
|
|
1747
1786
|
|
|
1787
|
+
@pytest.mark.parametrize(
|
|
1788
|
+
"line,expected",
|
|
1789
|
+
[
|
|
1790
|
+
# Basic test cases
|
|
1791
|
+
("np.", "attribute"),
|
|
1792
|
+
("np.ran", "attribute"),
|
|
1793
|
+
("np.random.rand(np.random.ran", "attribute"),
|
|
1794
|
+
("np.random.rand(n", "global"),
|
|
1795
|
+
("d['k.e.y.'](ran", "global"),
|
|
1796
|
+
("d[0].k", "attribute"),
|
|
1797
|
+
("a = { 'a': np.ran", "attribute"),
|
|
1798
|
+
("n", "global"),
|
|
1799
|
+
("", "global"),
|
|
1800
|
+
# Dots in string literals
|
|
1801
|
+
('some_var = "this is a string with a dot.', "global"),
|
|
1802
|
+
("text = 'another string with a dot.", "global"),
|
|
1803
|
+
('f"greeting {user.na', "attribute"), # Cursor in f-string expression
|
|
1804
|
+
('t"welcome {guest.na', "attribute"), # Cursor in t-string expression
|
|
1805
|
+
('f"hello {name} worl', "global"), # Cursor in f-string outside expression
|
|
1806
|
+
('f"hello {{a.', "global"),
|
|
1807
|
+
('f"hello {{{a.', "attribute"),
|
|
1808
|
+
# Backslash escapes in strings
|
|
1809
|
+
('var = "string with \\"escaped quote and a dot.', "global"),
|
|
1810
|
+
("escaped = 'single \\'quote\\' with a dot.", "global"),
|
|
1811
|
+
# Multi-line strings
|
|
1812
|
+
('multi = """This is line one\nwith a dot.', "global"),
|
|
1813
|
+
("multi_single = '''Another\nmulti-line\nwith a dot.", "global"),
|
|
1814
|
+
# Inline comments
|
|
1815
|
+
("x = 5 # This is a comment", "global"),
|
|
1816
|
+
("y = obj.method() # Comment after dot.method", "global"),
|
|
1817
|
+
# Hash symbol within string literals should not be treated as comments
|
|
1818
|
+
("d['#'] = np.", "attribute"),
|
|
1819
|
+
# Nested parentheses with dots
|
|
1820
|
+
("complex_expr = (func((obj.method(param.attr", "attribute"),
|
|
1821
|
+
("multiple_nesting = {key: [value.attr", "attribute"),
|
|
1822
|
+
# Numbers
|
|
1823
|
+
("3.", "global"),
|
|
1824
|
+
("3.14", "global"),
|
|
1825
|
+
("-42.14", "global"),
|
|
1826
|
+
("x = func(3.14", "global"),
|
|
1827
|
+
("x = func(a3.", "attribute"),
|
|
1828
|
+
("x = func(a3.12", "global"),
|
|
1829
|
+
("3.1.", "attribute"),
|
|
1830
|
+
("-3.1.", "attribute"),
|
|
1831
|
+
("(3).", "attribute"),
|
|
1832
|
+
# Additional cases
|
|
1833
|
+
("", "global"),
|
|
1834
|
+
('str_with_code = "x.attr', "global"),
|
|
1835
|
+
('f"formatted {obj.attr', "attribute"),
|
|
1836
|
+
('f"formatted {obj.attr}', "global"),
|
|
1837
|
+
("dict_with_dots = {'key.with.dots': value.attr", "attribute"),
|
|
1838
|
+
("d[f'{a}']['{a.", "global"),
|
|
1839
|
+
],
|
|
1840
|
+
)
|
|
1841
|
+
def test_completion_context(line, expected):
|
|
1842
|
+
"""Test completion context"""
|
|
1843
|
+
ip = get_ipython()
|
|
1844
|
+
get_context = ip.Completer._determine_completion_context
|
|
1845
|
+
result = get_context(line)
|
|
1846
|
+
assert result.value == expected, f"Failed on input: '{line}'"
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
@pytest.mark.xfail(reason="Completion context not yet supported")
|
|
1850
|
+
@pytest.mark.parametrize(
|
|
1851
|
+
"line, expected",
|
|
1852
|
+
[
|
|
1853
|
+
("f'{f'a.", "global"), # Nested f-string
|
|
1854
|
+
("3a.", "global"), # names starting with numbers or other symbols
|
|
1855
|
+
("$).", "global"), # random things with dot at end
|
|
1856
|
+
],
|
|
1857
|
+
)
|
|
1858
|
+
def test_unsupported_completion_context(line, expected):
|
|
1859
|
+
"""Test unsupported completion context"""
|
|
1860
|
+
ip = get_ipython()
|
|
1861
|
+
get_context = ip.Completer._determine_completion_context
|
|
1862
|
+
result = get_context(line)
|
|
1863
|
+
assert result.value == expected, f"Failed on input: '{line}'"
|
|
1864
|
+
|
|
1865
|
+
|
|
1748
1866
|
@pytest.mark.parametrize(
|
|
1749
1867
|
"setup,code,expected,not_expected",
|
|
1750
1868
|
[
|
|
@@ -425,6 +425,7 @@ class TerminalInteractiveShell(InteractiveShell):
|
|
|
425
425
|
"Default is `'NavigableAutoSuggestFromHistory`'.",
|
|
426
426
|
allow_none=True,
|
|
427
427
|
).tag(config=True)
|
|
428
|
+
_autosuggestions_provider: Any
|
|
428
429
|
|
|
429
430
|
llm_constructor_kwargs = Dict(
|
|
430
431
|
{},
|
|
@@ -434,6 +435,31 @@ class TerminalInteractiveShell(InteractiveShell):
|
|
|
434
435
|
This is used to – for example – set the `model_id`""",
|
|
435
436
|
).tag(config=True)
|
|
436
437
|
|
|
438
|
+
llm_prefix_from_history = DottedObjectName(
|
|
439
|
+
"input_history",
|
|
440
|
+
help="""\
|
|
441
|
+
Fully Qualifed name of a function that takes an IPython history manager and
|
|
442
|
+
return a prefix to pass the llm provider in addition to the current buffer
|
|
443
|
+
text.
|
|
444
|
+
|
|
445
|
+
You can use:
|
|
446
|
+
|
|
447
|
+
- no_prefix
|
|
448
|
+
- input_history
|
|
449
|
+
|
|
450
|
+
As default value. `input_history` (default), will use all the input history
|
|
451
|
+
of current IPython session
|
|
452
|
+
|
|
453
|
+
""",
|
|
454
|
+
).tag(config=True)
|
|
455
|
+
_llm_prefix_from_history: Any
|
|
456
|
+
|
|
457
|
+
@observe("llm_prefix_from_history")
|
|
458
|
+
def _llm_prefix_from_history_changed(self, change):
|
|
459
|
+
name = change.new
|
|
460
|
+
self._llm_prefix_from_history = name
|
|
461
|
+
self._set_autosuggestions()
|
|
462
|
+
|
|
437
463
|
llm_provider_class = DottedObjectName(
|
|
438
464
|
None,
|
|
439
465
|
allow_none=True,
|
|
@@ -448,6 +474,7 @@ class TerminalInteractiveShell(InteractiveShell):
|
|
|
448
474
|
`stream_inline_completions`
|
|
449
475
|
""",
|
|
450
476
|
).tag(config=True)
|
|
477
|
+
_llm_provider_class: Any = None
|
|
451
478
|
|
|
452
479
|
@observe("llm_provider_class")
|
|
453
480
|
def _llm_provider_class_changed(self, change):
|
|
@@ -457,15 +484,12 @@ class TerminalInteractiveShell(InteractiveShell):
|
|
|
457
484
|
"TerminalInteractiveShell.llm_provider_class is a provisional"
|
|
458
485
|
" API as of IPython 8.32, and may change without warnings."
|
|
459
486
|
)
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
else:
|
|
463
|
-
self.log.warn(
|
|
464
|
-
"llm_provider_class only has effects when using"
|
|
465
|
-
"`NavigableAutoSuggestFromHistory` as auto_suggest."
|
|
466
|
-
)
|
|
487
|
+
self._llm_provider_class = provider_class
|
|
488
|
+
self._set_autosuggestions()
|
|
467
489
|
|
|
468
|
-
def _set_autosuggestions(self, provider):
|
|
490
|
+
def _set_autosuggestions(self, provider=None):
|
|
491
|
+
if provider is None:
|
|
492
|
+
provider = self.autosuggestions_provider
|
|
469
493
|
# disconnect old handler
|
|
470
494
|
if self.auto_suggest and isinstance(
|
|
471
495
|
self.auto_suggest, NavigableAutoSuggestFromHistory
|
|
@@ -477,14 +501,34 @@ class TerminalInteractiveShell(InteractiveShell):
|
|
|
477
501
|
self.auto_suggest = AutoSuggestFromHistory()
|
|
478
502
|
elif provider == "NavigableAutoSuggestFromHistory":
|
|
479
503
|
# LLM stuff are all Provisional in 8.32
|
|
480
|
-
if self.
|
|
481
|
-
llm_provider_constructor = import_item(self.
|
|
504
|
+
if self._llm_provider_class:
|
|
505
|
+
llm_provider_constructor = import_item(self._llm_provider_class)
|
|
482
506
|
llm_provider = llm_provider_constructor(**self.llm_constructor_kwargs)
|
|
483
507
|
else:
|
|
484
508
|
llm_provider = None
|
|
485
509
|
self.auto_suggest = NavigableAutoSuggestFromHistory()
|
|
486
510
|
# Provisinal in 8.32
|
|
487
511
|
self.auto_suggest._llm_provider = llm_provider
|
|
512
|
+
|
|
513
|
+
name = self.llm_prefix_from_history
|
|
514
|
+
|
|
515
|
+
if name == "no_prefix":
|
|
516
|
+
|
|
517
|
+
def no_prefix(history_manager):
|
|
518
|
+
return ""
|
|
519
|
+
|
|
520
|
+
fun = no_prefix
|
|
521
|
+
|
|
522
|
+
elif name == "input_history":
|
|
523
|
+
|
|
524
|
+
def input_history(history_manager):
|
|
525
|
+
return "\n".join([s[2] for s in history_manager.get_range()]) + "\n"
|
|
526
|
+
|
|
527
|
+
fun = input_history
|
|
528
|
+
|
|
529
|
+
else:
|
|
530
|
+
fun = import_item(name)
|
|
531
|
+
self.auto_suggest._llm_prefixer = fun
|
|
488
532
|
else:
|
|
489
533
|
raise ValueError("No valid provider.")
|
|
490
534
|
if self.pt_app:
|
|
@@ -50,7 +50,6 @@ def inputhook(context):
|
|
|
50
50
|
except AttributeError: # Only for Qt>=5.14.
|
|
51
51
|
pass
|
|
52
52
|
_appref = app = QtGui.QApplication([" "])
|
|
53
|
-
_eventloop = QtCore.QEventLoop(app)
|
|
54
53
|
|
|
55
54
|
# "reclaim" IPython sys.excepthook after event loop starts
|
|
56
55
|
# without this, it defaults back to BaseIPythonApplication.excepthook
|
|
@@ -58,6 +57,9 @@ def inputhook(context):
|
|
|
58
57
|
# formatting and look like "bug in IPython".
|
|
59
58
|
QtCore.QTimer.singleShot(0, _reclaim_excepthook)
|
|
60
59
|
|
|
60
|
+
if _eventloop is None:
|
|
61
|
+
_eventloop = QtCore.QEventLoop(app)
|
|
62
|
+
|
|
61
63
|
if sys.platform == 'win32':
|
|
62
64
|
# The QSocketNotifier method doesn't appear to work on Windows.
|
|
63
65
|
# Use polling instead.
|
|
@@ -203,7 +203,7 @@ AUTO_SUGGEST_BINDINGS = [
|
|
|
203
203
|
Binding(
|
|
204
204
|
auto_suggest.accept,
|
|
205
205
|
["right"],
|
|
206
|
-
"has_suggestion & default_buffer_focused & emacs_like_insert_mode",
|
|
206
|
+
"has_suggestion & default_buffer_focused & emacs_like_insert_mode & is_cursor_at_the_end_of_line",
|
|
207
207
|
),
|
|
208
208
|
Binding(
|
|
209
209
|
auto_suggest.accept_word,
|
|
@@ -9,7 +9,7 @@ import prompt_toolkit
|
|
|
9
9
|
from prompt_toolkit.buffer import Buffer
|
|
10
10
|
from prompt_toolkit.key_binding import KeyPressEvent
|
|
11
11
|
from prompt_toolkit.key_binding.bindings import named_commands as nc
|
|
12
|
-
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, Suggestion
|
|
12
|
+
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, Suggestion
|
|
13
13
|
from prompt_toolkit.document import Document
|
|
14
14
|
from prompt_toolkit.history import History
|
|
15
15
|
from prompt_toolkit.shortcuts import PromptSession
|
|
@@ -103,9 +103,6 @@ class AppendAutoSuggestionInAnyLine(Processor):
|
|
|
103
103
|
if len(suggestions) == 0:
|
|
104
104
|
return noop("noop: no suggestions")
|
|
105
105
|
|
|
106
|
-
suggestions_longer_than_buffer: bool = (
|
|
107
|
-
len(suggestions) + ti.document.cursor_position_row > ti.document.line_count
|
|
108
|
-
)
|
|
109
106
|
if prompt_toolkit.VERSION < (3, 0, 49):
|
|
110
107
|
if len(suggestions) > 1 and prompt_toolkit.VERSION < (3, 0, 49):
|
|
111
108
|
if ti.lineno == ti.document.cursor_position_row:
|
|
@@ -132,7 +129,6 @@ class AppendAutoSuggestionInAnyLine(Processor):
|
|
|
132
129
|
return Transformation(fragments=ti.fragments + [(self.style, suggestion)])
|
|
133
130
|
if is_last_line:
|
|
134
131
|
if delta < len(suggestions):
|
|
135
|
-
extra = f"; {len(suggestions) - delta} line(s) hidden"
|
|
136
132
|
suggestion = f"… rest of suggestion ({len(suggestions) - delta} lines) and code hidden"
|
|
137
133
|
return Transformation([(self.style, suggestion)])
|
|
138
134
|
|
|
@@ -171,19 +167,21 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
171
167
|
_connected_apps: list[PromptSession]
|
|
172
168
|
|
|
173
169
|
# handle to the currently running llm task that appends suggestions to the
|
|
174
|
-
# current buffer; we keep a handle to it in order to
|
|
170
|
+
# current buffer; we keep a handle to it in order to cancel it when there is a cursor movement, or
|
|
175
171
|
# another request.
|
|
176
172
|
_llm_task: asyncio.Task | None = None
|
|
177
173
|
|
|
178
174
|
# This is the instance of the LLM provider from jupyter-ai to which we forward the request
|
|
179
175
|
# to generate inline completions.
|
|
180
176
|
_llm_provider: Any | None
|
|
177
|
+
_llm_prefixer: callable = lambda self, x: "wrong"
|
|
181
178
|
|
|
182
179
|
def __init__(self):
|
|
183
180
|
super().__init__()
|
|
184
181
|
self.skip_lines = 0
|
|
185
182
|
self._connected_apps = []
|
|
186
183
|
self._llm_provider = None
|
|
184
|
+
self._request_number = 0
|
|
187
185
|
|
|
188
186
|
def reset_history_position(self, _: Buffer):
|
|
189
187
|
self.skip_lines = 0
|
|
@@ -305,7 +303,7 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
305
303
|
|
|
306
304
|
def _cancel_running_llm_task(self) -> None:
|
|
307
305
|
"""
|
|
308
|
-
Try to
|
|
306
|
+
Try to cancel the currently running llm_task if exists, and set it to None.
|
|
309
307
|
"""
|
|
310
308
|
if self._llm_task is not None:
|
|
311
309
|
if self._llm_task.done():
|
|
@@ -349,10 +347,10 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
349
347
|
try:
|
|
350
348
|
await self._trigger_llm_core(buffer)
|
|
351
349
|
except Exception as e:
|
|
352
|
-
get_ipython().log.error("error")
|
|
350
|
+
get_ipython().log.error("error %s", e)
|
|
353
351
|
raise
|
|
354
352
|
|
|
355
|
-
# here we need a cancellable task so we can't just await the error
|
|
353
|
+
# here we need a cancellable task so we can't just await the error caught
|
|
356
354
|
self._llm_task = asyncio.create_task(error_catcher(buffer))
|
|
357
355
|
await self._llm_task
|
|
358
356
|
|
|
@@ -364,9 +362,8 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
364
362
|
provider to stream it's response back to us iteratively setting it as
|
|
365
363
|
the suggestion on the current buffer.
|
|
366
364
|
|
|
367
|
-
Unlike with JupyterAi, as we do not have multiple cell, the cell
|
|
368
|
-
is always set to `
|
|
369
|
-
time and ignore threply from past numbers.
|
|
365
|
+
Unlike with JupyterAi, as we do not have multiple cell, the cell id
|
|
366
|
+
is always set to `None`.
|
|
370
367
|
|
|
371
368
|
We set the prefix to the current cell content, but could also inset the
|
|
372
369
|
rest of the history or even just the non-fail history.
|
|
@@ -386,9 +383,15 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
386
383
|
except ModuleNotFoundError:
|
|
387
384
|
jai_models = None
|
|
388
385
|
|
|
386
|
+
hm = buffer.history.shell.history_manager
|
|
387
|
+
prefix = self._llm_prefixer(hm)
|
|
388
|
+
get_ipython().log.debug("prefix: %s", prefix)
|
|
389
|
+
|
|
390
|
+
self._request_number += 1
|
|
391
|
+
request_number = self._request_number
|
|
389
392
|
request = jai_models.InlineCompletionRequest(
|
|
390
|
-
number=
|
|
391
|
-
prefix=buffer.document.text,
|
|
393
|
+
number=request_number,
|
|
394
|
+
prefix=prefix + buffer.document.text,
|
|
392
395
|
suffix="",
|
|
393
396
|
mime="text/x-python",
|
|
394
397
|
stream=True,
|
|
@@ -400,6 +403,9 @@ class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
|
|
|
400
403
|
async for reply_and_chunks in self._llm_provider.stream_inline_completions(
|
|
401
404
|
request
|
|
402
405
|
):
|
|
406
|
+
if self._request_number != request_number:
|
|
407
|
+
# If a new suggestion was requested, skip processing this one.
|
|
408
|
+
return
|
|
403
409
|
if isinstance(reply_and_chunks, jai_models.InlineCompletionReply):
|
|
404
410
|
if len(reply_and_chunks.list.items) > 1:
|
|
405
411
|
raise ValueError(
|
|
@@ -422,7 +428,7 @@ async def llm_autosuggestion(event: KeyPressEvent):
|
|
|
422
428
|
This will first make sure that the current buffer have _MIN_LINES (7)
|
|
423
429
|
available lines to insert the LLM completion
|
|
424
430
|
|
|
425
|
-
Provisional as of 8.32, may change without
|
|
431
|
+
Provisional as of 8.32, may change without warnings
|
|
426
432
|
|
|
427
433
|
"""
|
|
428
434
|
_MIN_LINES = 5
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
from jupyter_ai_magics import BaseProvider
|
|
5
|
+
from langchain_community.llms import FakeListLLM
|
|
6
|
+
except ImportError:
|
|
7
|
+
|
|
8
|
+
class BaseProvider:
|
|
9
|
+
pass
|
|
10
|
+
|
|
11
|
+
class FakeListLLM:
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
FIBONACCI = """\
|
|
16
|
+
def fib(n):
|
|
17
|
+
if n < 2: return n
|
|
18
|
+
return fib(n - 1) + fib(n - 2)
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class FibonacciCompletionProvider(BaseProvider, FakeListLLM): # type: ignore[misc, valid-type]
|
|
23
|
+
|
|
24
|
+
id = "my_provider"
|
|
25
|
+
name = "My Provider"
|
|
26
|
+
model_id_key = "model"
|
|
27
|
+
models = ["model_a"]
|
|
28
|
+
|
|
29
|
+
def __init__(self, **kwargs):
|
|
30
|
+
kwargs["responses"] = ["This fake response will not be used for completion"]
|
|
31
|
+
kwargs["model_id"] = "model_a"
|
|
32
|
+
super().__init__(**kwargs)
|
|
33
|
+
|
|
34
|
+
async def generate_inline_completions(self, request):
|
|
35
|
+
raise ValueError("IPython only supports streaming models.")
|
|
36
|
+
|
|
37
|
+
async def stream_inline_completions(self, request):
|
|
38
|
+
from jupyter_ai.completions.models import (
|
|
39
|
+
InlineCompletionList,
|
|
40
|
+
InlineCompletionReply,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
assert request.number > 0
|
|
44
|
+
token = f"t{request.number}s0"
|
|
45
|
+
last_line = request.prefix.rstrip("\n").splitlines()[-1]
|
|
46
|
+
|
|
47
|
+
if not FIBONACCI.startswith(last_line):
|
|
48
|
+
return
|
|
49
|
+
|
|
50
|
+
yield InlineCompletionReply(
|
|
51
|
+
list=InlineCompletionList(
|
|
52
|
+
items=[
|
|
53
|
+
{"insertText": "", "isIncomplete": True, "token": token},
|
|
54
|
+
]
|
|
55
|
+
),
|
|
56
|
+
reply_to=request.number,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
async for reply in self._stream(
|
|
60
|
+
FIBONACCI[len(last_line) :],
|
|
61
|
+
request.number,
|
|
62
|
+
token,
|
|
63
|
+
):
|
|
64
|
+
yield reply
|
|
65
|
+
|
|
66
|
+
async def _stream(self, sentence, request_number, token, start_with=""):
|
|
67
|
+
from jupyter_ai.completions.models import InlineCompletionStreamChunk
|
|
68
|
+
|
|
69
|
+
suggestion = start_with
|
|
70
|
+
|
|
71
|
+
for fragment in sentence.split(" "):
|
|
72
|
+
await asyncio.sleep(0.05)
|
|
73
|
+
if suggestion:
|
|
74
|
+
suggestion += " "
|
|
75
|
+
suggestion += fragment
|
|
76
|
+
yield InlineCompletionStreamChunk(
|
|
77
|
+
type="stream",
|
|
78
|
+
response={"insertText": suggestion, "token": token},
|
|
79
|
+
reply_to=request_number,
|
|
80
|
+
done=False,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# finally, send a message confirming that we are done
|
|
84
|
+
yield InlineCompletionStreamChunk(
|
|
85
|
+
type="stream",
|
|
86
|
+
response={"insertText": suggestion, "token": token},
|
|
87
|
+
reply_to=request_number,
|
|
88
|
+
done=True,
|
|
89
|
+
)
|