Skip to content

Commit 989f765

Browse files
committed
Removed unused code
1 parent f393802 commit 989f765

File tree

6 files changed

+3
-18
lines changed

6 files changed

+3
-18
lines changed

lib/matplotlib/_constrained_layout.py

-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ def reposition_axes(layoutgrids, fig, renderer, *,
573573
# coordinates...
574574
ss = ax.get_subplotspec()
575575
gs = ss.get_gridspec()
576-
nrows, ncols = gs.get_geometry()
577576
if gs not in layoutgrids:
578577
return
579578

lib/matplotlib/backend_bases.py

-1
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,6 @@ class Done(Exception):
15281528
def _draw(renderer): raise Done(renderer)
15291529

15301530
with cbook._setattr_cm(figure, draw=_draw), ExitStack() as stack:
1531-
orig_canvas = figure.canvas
15321531
if print_method is None:
15331532
fmt = figure.canvas.get_default_filetype()
15341533
# Even for a canvas' default output type, a canvas switch may be

lib/matplotlib/bezier.py

-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ def find_bezier_t_intersecting_with_closedpath(
172172
if start_inside ^ middle_inside:
173173
t1 = middle_t
174174
end = middle
175-
end_inside = middle_inside
176175
else:
177176
t0 = middle_t
178177
start = middle

lib/matplotlib/testing/compare.py

-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import logging
99
import os
1010
from pathlib import Path
11-
import re
1211
import shutil
1312
import subprocess
1413
import sys
@@ -64,15 +63,6 @@ def get_file_hash(path, block_size=2 ** 20):
6463
return md5.hexdigest()
6564

6665

67-
# Modified from https://bugs.python.org/issue25567.
68-
_find_unsafe_bytes = re.compile(br'[^a-zA-Z0-9_@%+=:,./-]').search
69-
70-
71-
def _shlex_quote_bytes(b):
72-
return (b if _find_unsafe_bytes(b) is None
73-
else b"'" + b.replace(b"'", b"'\"'\"'") + b"'")
74-
75-
7666
class _ConverterError(Exception):
7767
pass
7868

lib/mpl_toolkits/axes_grid1/mpl_axes.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def __getitem__(self, k):
4040
def __call__(self, *v, **kwargs):
4141
return maxes.Axes.axis(self.axes, *v, **kwargs)
4242

43-
def _init_axis_artists(self, axes=None):
44-
if axes is None:
45-
axes = self
43+
def _init_axis_artists(self):
4644
self._axislines = self.AxisDict(self)
4745
self._axislines.update(
4846
bottom=SimpleAxisArtist(self.xaxis, 1, self.spines["bottom"]),

tools/make_icons.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def save_icon(fig, dest_dir, name):
4646
def make_icon(font_path, ccode):
4747
fig = plt.figure(figsize=(1, 1))
4848
fig.patch.set_alpha(0.0)
49-
text = fig.text(0.5, 0.48, chr(ccode), ha='center', va='center',
50-
font=font_path, fontsize=68)
49+
fig.text(0.5, 0.48, chr(ccode), ha='center', va='center',
50+
font=font_path, fontsize=68)
5151
return fig
5252

5353

0 commit comments

Comments
 (0)