diff options
Diffstat (limited to 'ptpython/ipython.py')
-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() |