Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cdce06c

Browse filesBrowse files
committed
STY: Fix under-indented line continuations.
1 parent 7730d0c commit cdce06c
Copy full SHA for cdce06c

File tree

Expand file treeCollapse file tree

8 files changed

+22
-27
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+22
-27
lines changed

‎.flake8

Copy file name to clipboardExpand all lines: .flake8
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ignore =
44
# Normal default
55
E121,E123,E126,E226,E24,E704,W503,W504,
66
# Additional ignores:
7-
E122, E127, E129, E131,
7+
E122, E127, E131,
88
E265, E266,
99
E305, E306,
1010
E722, E741,

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ def _init_tests():
11581158

11591159
from matplotlib import ft2font
11601160
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
1161-
ft2font.__freetype_build_type__ != 'local'):
1161+
ft2font.__freetype_build_type__ != 'local'):
11621162
_log.warning(
11631163
f"Matplotlib is not built with the correct FreeType version to "
11641164
f"run tests. Rebuild without setting system_freetype=1 in "

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5825,7 +5825,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
58255825
# Transform from native to data coordinates?
58265826
t = collection._transform
58275827
if (not isinstance(t, mtransforms.Transform) and
5828-
hasattr(t, '_as_mpl_transform')):
5828+
hasattr(t, '_as_mpl_transform')):
58295829
t = t._as_mpl_transform(self.axes)
58305830

58315831
if t and any(t.contains_branch_seperately(self.transData)):
@@ -6057,7 +6057,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
60576057
# Transform from native to data coordinates?
60586058
t = collection._transform
60596059
if (not isinstance(t, mtransforms.Transform) and
6060-
hasattr(t, '_as_mpl_transform')):
6060+
hasattr(t, '_as_mpl_transform')):
60616061
t = t._as_mpl_transform(self.axes)
60626062

60636063
if t and any(t.contains_branch_seperately(self.transData)):
@@ -6209,7 +6209,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
62096209
dx = np.diff(x)
62106210
dy = np.diff(y)
62116211
if (np.ptp(dx) < 0.01 * abs(dx.mean()) and
6212-
np.ptp(dy) < 0.01 * abs(dy.mean())):
6212+
np.ptp(dy) < 0.01 * abs(dy.mean())):
62136213
style = "image"
62146214
else:
62156215
style = "pcolorimage"

‎lib/matplotlib/axes/_secondary_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_secondary_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def set_functions(self, functions):
189189
inverse.
190190
"""
191191
if (isinstance(functions, tuple) and len(functions) == 2 and
192-
callable(functions[0]) and callable(functions[1])):
192+
callable(functions[0]) and callable(functions[1])):
193193
# make an arbitrary convert from a two-tuple of functions
194194
# forward and inverse.
195195
self._functions = functions

‎lib/matplotlib/collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/collections.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def get_datalim(self, transData):
197197
transform = self.get_transform()
198198
transOffset = self.get_offset_transform()
199199
if (not self._offsetsNone and
200-
not transOffset.contains_branch(transData)):
200+
not transOffset.contains_branch(transData)):
201201
# if there are offsets but in some coords other than data,
202202
# then don't use them for autoscaling.
203203
return transforms.Bbox.null()
@@ -329,11 +329,11 @@ def draw(self, renderer):
329329
edgecolors = self.get_edgecolor()
330330
do_single_path_optimization = False
331331
if (len(paths) == 1 and len(trans) <= 1 and
332-
len(facecolors) == 1 and len(edgecolors) == 1 and
333-
len(self._linewidths) == 1 and
334-
all(ls[1] is None for ls in self._linestyles) and
335-
len(self._antialiaseds) == 1 and len(self._urls) == 1 and
336-
self.get_hatch() is None):
332+
len(facecolors) == 1 and len(edgecolors) == 1 and
333+
len(self._linewidths) == 1 and
334+
all(ls[1] is None for ls in self._linestyles) and
335+
len(self._antialiaseds) == 1 and len(self._urls) == 1 and
336+
self.get_hatch() is None):
337337
if len(trans):
338338
combined_transform = transforms.Affine2D(trans[0]) + transform
339339
else:

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,8 @@ def __init__(self,
631631
if isinstance(family, str):
632632
# Treat family as a fontconfig pattern if it is the only
633633
# parameter provided.
634-
if (style is None and
635-
variant is None and
636-
weight is None and
637-
stretch is None and
638-
size is None and
639-
fname is None):
634+
if (style is None and variant is None and weight is None and
635+
stretch is None and size is None and fname is None):
640636
self.set_fontconfig_pattern(family)
641637
return
642638

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def set_default_locators_and_formatters(self, axis):
109109
axis.set_major_formatter(ScalarFormatter())
110110
axis.set_minor_formatter(NullFormatter())
111111
# update the minor locator for x and y axis based on rcParams
112-
if (axis.axis_name == 'x' and mpl.rcParams['xtick.minor.visible']
113-
or axis.axis_name == 'y' and mpl.rcParams['ytick.minor.visible']):
112+
if (axis.axis_name == 'x' and mpl.rcParams['xtick.minor.visible'] or
113+
axis.axis_name == 'y' and mpl.rcParams['ytick.minor.visible']):
114114
axis.set_minor_locator(AutoMinorLocator())
115115
else:
116116
axis.set_minor_locator(NullLocator())
@@ -194,8 +194,8 @@ def set_default_locators_and_formatters(self, axis):
194194
axis.set_major_formatter(ScalarFormatter())
195195
axis.set_minor_formatter(NullFormatter())
196196
# update the minor locator for x and y axis based on rcParams
197-
if (axis.axis_name == 'x' and mpl.rcParams['xtick.minor.visible']
198-
or axis.axis_name == 'y' and mpl.rcParams['ytick.minor.visible']):
197+
if (axis.axis_name == 'x' and mpl.rcParams['xtick.minor.visible'] or
198+
axis.axis_name == 'y' and mpl.rcParams['ytick.minor.visible']):
199199
axis.set_minor_locator(AutoMinorLocator())
200200
else:
201201
axis.set_minor_locator(NullLocator())

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ def _check(points):
228228
if isinstance(points, np.ma.MaskedArray):
229229
cbook._warn_external("Bbox bounds are a masked array.")
230230
points = np.asarray(points)
231-
if (points[1, 0] - points[0, 0] == 0 or
232-
points[1, 1] - points[0, 1] == 0):
231+
if any((points[1, :] - points[0, :]) == 0):
233232
cbook._warn_external("Singular Bbox.")
234233

235234
def frozen(self):
@@ -2170,8 +2169,8 @@ def blended_transform_factory(x_transform, y_transform):
21702169
A faster version of the blended transform is returned for the case
21712170
where both child transforms are affine.
21722171
"""
2173-
if (isinstance(x_transform, Affine2DBase)
2174-
and isinstance(y_transform, Affine2DBase)):
2172+
if (isinstance(x_transform, Affine2DBase) and
2173+
isinstance(y_transform, Affine2DBase)):
21752174
return BlendedAffine2D(x_transform, y_transform)
21762175
return BlendedGenericTransform(x_transform, y_transform)
21772176

@@ -2565,7 +2564,7 @@ def _revalidate(self):
25652564
# only recompute if the invalidation includes the non_affine part of
25662565
# the transform
25672566
if (self._invalid & self.INVALID_NON_AFFINE == self.INVALID_NON_AFFINE
2568-
or self._transformed_path is None):
2567+
or self._transformed_path is None):
25692568
self._transformed_path = \
25702569
self._transform.transform_path_non_affine(self._path)
25712570
self._transformed_points = \

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.