Skip to content

Commit 7b6ab95

Browse files
committed
Use f-string
1 parent bc7ea75 commit 7b6ab95

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,13 +1729,11 @@ def in_paste_mode(self):
17291729
self.update_completion()
17301730

17311731
def __repr__(self):
1732-
s = ""
1733-
s += "<" + repr(type(self)) + "\n"
1734-
s += " cursor_offset:" + repr(self.cursor_offset) + "\n"
1735-
s += " num display lines:" + repr(len(self.display_lines)) + "\n"
1736-
s += " lines scrolled down:" + repr(self.scroll_offset) + "\n"
1737-
s += ">"
1738-
return s
1732+
return f"""<{type(self)}
1733+
cursor_offset: {self.cursor_offset}
1734+
num display lines: {len(self.display_lines)}
1735+
lines scrolled down: {self.scroll_offset}
1736+
>"""
17391737

17401738
def _get_current_line(self):
17411739
return self._current_line

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy