Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 084b121

Browse filesBrowse files
authored
Merge pull request #12842 from timhoffm/fix-formatting-bug
Fix message in nbagg connection_info()
2 parents a9d4ccc + 887a647 commit 084b121
Copy full SHA for 084b121

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed

‎lib/matplotlib/backends/backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_nbagg.py
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828

2929
def connection_info():
3030
"""
31-
Return a string showing the figure and connection status for
32-
the backend. This is intended as a diagnostic tool, and not for general
33-
use.
31+
Return a string showing the figure and connection status for the backend.
3432
33+
This is intended as a diagnostic tool, and not for general use.
3534
"""
36-
result = []
37-
for manager in Gcf.get_all_fig_managers():
38-
fig = manager.canvas.figure
39-
result.append('{0} - {0}'.format((fig.get_label() or
40-
"Figure {0}".format(manager.num)),
41-
manager.web_sockets))
35+
result = [
36+
'{fig} - {socket}'.format(
37+
fig=(manager.canvas.figure.get_label()
38+
or "Figure {}".format(manager.num)),
39+
socket=manager.web_sockets)
40+
for manager in Gcf.get_all_fig_managers()
41+
]
4242
if not is_interactive():
43-
result.append('Figures pending show: {0}'.format(len(Gcf._activeQue)))
43+
result.append('Figures pending show: {}'.format(len(Gcf._activeQue)))
4444
return '\n'.join(result)
4545

4646

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.