Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 887a647

Browse files
committed
Fix message of nbagg connection_info
1 parent f075b1b commit 887a647

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/matplotlib/backends/backend_nbagg.py

Lines 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)