diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 20:03:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 20:03:26 +0000 |
commit | 75c118cf7675e6f19cbb80bc16e92740676c7f4b (patch) | |
tree | b7840cfab1291920b36df87833c253051d4b54f0 /ptpython/ipython.py | |
parent | Adding upstream version 3.0.26. (diff) | |
download | ptpython-75c118cf7675e6f19cbb80bc16e92740676c7f4b.tar.xz ptpython-75c118cf7675e6f19cbb80bc16e92740676c7f4b.zip |
Adding upstream version 3.0.27.upstream/3.0.27upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | ptpython/ipython.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ptpython/ipython.py b/ptpython/ipython.py index ad0516a..0692214 100644 --- a/ptpython/ipython.py +++ b/ptpython/ipython.py @@ -8,6 +8,7 @@ also the power of for instance all the %-magic functions that IPython has to offer. """ + from __future__ import annotations from typing import Iterable @@ -156,7 +157,7 @@ class MagicsCompleter(Completer): for m in sorted(self.magics_manager.magics["line"]): if m.startswith(text): - yield Completion("%s" % m, -len(text)) + yield Completion(f"{m}", -len(text)) class AliasCompleter(Completer): @@ -172,7 +173,7 @@ class AliasCompleter(Completer): for a, cmd in sorted(aliases, key=lambda a: a[0]): if a.startswith(text): - yield Completion("%s" % a, -len(text), display_meta=cmd) + yield Completion(f"{a}", -len(text), display_meta=cmd) class IPythonInput(PythonInput): @@ -279,9 +280,8 @@ def initialize_extensions(shell, extensions): shell.extension_manager.load_extension(ext) except: warn( - "Error in loading extension: %s" % ext - + "\nCheck your config files in %s" - % ipy_utils.path.get_ipython_dir() + f"Error in loading extension: {ext}" + + f"\nCheck your config files in {ipy_utils.path.get_ipython_dir()}" ) shell.showtraceback() |