@@ -1972,8 +1972,8 @@ def _switch_canvas_and_return_print_method(self, fmt, backend=None):
1972
1972
"""
1973
1973
Context manager temporarily setting the canvas for saving the figure::
1974
1974
1975
- with canvas._switch_canvas_and_return_print_method(fmt, backend) \\
1976
- as print_method:
1975
+ with ( canvas._switch_canvas_and_return_print_method(fmt, backend)
1976
+ as print_method) :
1977
1977
# ``print_method`` is a suitable ``print_{fmt}`` method, and
1978
1978
# the figure's canvas is temporarily switched to the method's
1979
1979
# canvas within the with... block. ``print_method`` is also
@@ -2110,13 +2110,13 @@ def print_figure(
2110
2110
"'figure', or omit the *papertype* argument entirely." )
2111
2111
2112
2112
# Remove the figure manager, if any, to avoid resizing the GUI widget.
2113
- with cbook ._setattr_cm (self , manager = None ), \
2114
- self ._switch_canvas_and_return_print_method (format , backend ) \
2115
- as print_method , \
2116
- cbook ._setattr_cm (self .figure , dpi = dpi ), \
2117
- cbook ._setattr_cm (self .figure .canvas , _device_pixel_ratio = 1 ), \
2118
- cbook ._setattr_cm (self .figure .canvas , _is_saving = True ), \
2119
- ExitStack () as stack :
2113
+ with ( cbook ._setattr_cm (self , manager = None ),
2114
+ self ._switch_canvas_and_return_print_method (format , backend )
2115
+ as print_method ,
2116
+ cbook ._setattr_cm (self .figure , dpi = dpi ),
2117
+ cbook ._setattr_cm (self .figure .canvas , _device_pixel_ratio = 1 ),
2118
+ cbook ._setattr_cm (self .figure .canvas , _is_saving = True ),
2119
+ ExitStack () as stack ) :
2120
2120
2121
2121
for prop in ["facecolor" , "edgecolor" ]:
2122
2122
color = locals ()[prop ]
0 commit comments