Skip to content

Remove dead code from LGTM alerts. #20439

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
Jun 27, 2021
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
2 changes: 0 additions & 2 deletions lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,6 @@ def set_inverted(self, inverted):

def set_default_intervals(self):
# docstring inherited
xmin, xmax = 0., 1.
# only change view if dataLim has not changed and user has
# not changed the view:
if (not self.axes.dataLim.mutatedx() and
Expand Down Expand Up @@ -2512,7 +2511,6 @@ def set_inverted(self, inverted):

def set_default_intervals(self):
# docstring inherited
ymin, ymax = 0., 1.
# only change view if dataLim has not changed and user has
# not changed the view:
if (not self.axes.dataLim.mutatedy() and
Expand Down
5 changes: 0 additions & 5 deletions lib/matplotlib/backends/web_backend/js/nbagg_mpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,6 @@ mpl.figure.prototype._canvas_extra_style = function (el) {
};

mpl.figure.prototype._key_event_extra = function (event, _name) {
var manager = IPython.notebook.keyboard_manager;
if (!manager) {
manager = IPython.keyboard_manager;
}

// Check for shift+enter
if (event.shiftKey && event.which === 13) {
this.canvas_div.blur();
Expand Down
3 changes: 0 additions & 3 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,6 @@ def subfigures(self, nrows=1, ncols=1, squeeze=True,
# Returned axis array will be always 2-d, even if nrows=ncols=1.
return sfarr

return sfarr

def add_subfigure(self, subplotspec, **kwargs):
"""
Add a `~.figure.SubFigure` to the figure as part of a subplot
Expand Down Expand Up @@ -1823,7 +1821,6 @@ def _do_layout(gs, mosaic, unique_ids, nested):
dict[label, Axes]
A flat dict of all of the Axes created.
"""
rows, cols = mosaic.shape
output = dict()

# we need to merge together the Axes at this level and the axes
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ def _set_plus_filled(self):
self._transform = Affine2D()
self._snap_threshold = 5.0
self._joinstyle = JoinStyle.miter
fs = self.get_fillstyle()
if not self._half_fill():
self._path = self._plus_filled_path
else:
Expand Down
7 changes: 0 additions & 7 deletions lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,6 @@ def get_extent_offsets(self, renderer):
if not whd_list:
return 2 * pad, 2 * pad, pad, pad, []

if self.height is None:
height_descent = max(h - yd for w, h, xd, yd in whd_list)
ydescent = max(yd for w, h, xd, yd in whd_list)
height = height_descent + ydescent
else:
height = self.height - 2 * pad # width w/o pad

hd_list = [(h, yd) for w, h, xd, yd in whd_list]
height, ydescent, yoffsets = _get_aligned_offsets(hd_list,
self.height,
Expand Down