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

Skip to content

Commit 5d93ecb

Browse files
committed
STY: import clean up
- moved `is_interactive` import to top of file - remove unused import (contextmanager, backend_agg)
1 parent eabc143 commit 5d93ecb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/matplotlib/backends/backend_nbagg.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# that changes made maintain expected behaviour.
55

66
from base64 import b64encode
7-
from contextlib import contextmanager
87
import json
98
import io
109
import os
@@ -18,7 +17,7 @@
1817

1918
from matplotlib import rcParams
2019
from matplotlib.figure import Figure
21-
from matplotlib.backends import backend_agg
20+
from matplotlib import is_interactive
2221
from matplotlib.backends.backend_webagg_core import (FigureManagerWebAgg,
2322
FigureCanvasWebAggCore,
2423
NavigationToolbar2WebAgg)
@@ -29,7 +28,6 @@
2928
class Show(ShowBase):
3029
def __call__(self, block=None):
3130
from matplotlib._pylab_helpers import Gcf
32-
from matplotlib import is_interactive
3331

3432
managers = Gcf.get_all_fig_managers()
3533
if not managers:
@@ -54,7 +52,6 @@ def __call__(self, block=None):
5452

5553

5654
def draw_if_interactive():
57-
from matplotlib import is_interactive
5855
import matplotlib._pylab_helpers as pylab_helpers
5956

6057
if is_interactive():

0 commit comments

Comments
 (0)