8000 Removed unused code and variables by oscargus · Pull Request #22287 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Removed unused code and variables #22287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/matplotlib/_constrained_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ def reposition_axes(layoutgrids, fig, renderer, *,
# coordinates...
ss = ax.get_subplotspec()
gs = ss.get_gridspec()
nrows, ncols = gs.get_geometry()
if gs not in layoutgrids:
return

Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,6 @@ class Done(Exception):
def _draw(renderer): raise Done(renderer)

with cbook._setattr_cm(figure, draw=_draw), ExitStack() as stack:
orig_canvas = figure.canvas
if print_method is None:
fmt = figure.canvas.get_default_filetype()
# Even for a canvas' default output type, a canvas switch may be
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/bezier.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def find_bezier_t_intersecting_with_closedpath(
if start_inside ^ middle_inside:
t1 = middle_t
end = middle
end_inside = middle_inside
else:
t0 = middle_t
start = middle
Expand Down
10 changes: 0 additions & 10 deletions lib/matplotlib/testing/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import logging
import os
from pathlib import Path
import re
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -64,15 +63,6 @@ def get_file_hash(path, block_size=2 ** 20):
return md5.hexdigest()


# Modified from https://bugs.python.org/issue25567.
_find_unsafe_bytes = re.compile(br'[^a-zA-Z0-9_@%+=:,./-]').search


def _shlex_quote_bytes(b):
return (b if _find_unsafe_bytes(b) is None
else b"'" + b.replace(b"'", b"'\"'\"'") + b"'")


class _ConverterError(Exception):
pass

Expand Down
4 changes: 1 addition & 3 deletions lib/mpl_toolkits/axes_grid1/mpl_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def __getitem__(self, k):
def __call__(self, *v, **kwargs):
return maxes.Axes.axis(self.axes, *v, **kwargs)

def _init_axis_artists(self, axes=None):
if axes is None:
axes = self
def _init_axis_artists(self):
self._axislines = self.AxisDict(self)
self._axislines.update(
bottom=SimpleAxisArtist(self.xaxis, 1, self.spines["bottom"]),
Expand Down
4 changes: 2 additions & 2 deletions tools/make_icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def save_icon(fig, dest_dir, name):
def make_icon(font_path, ccode):
fig = plt.figure(figsize=(1, 1))
fig.patch.set_alpha(0.0)
text = fig.text(0.5, 0.48, chr(ccode), ha='center', va='center',
font=font_path, fontsize=68)
fig.text(0.5, 0.48, chr(ccode), ha='center', va='center',
font=font_path, fontsize=68)
return fig


Expand Down
0