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 4434dc0

Browse filesBrowse files
anntzerQuLogic
authored andcommitted
Bump to flake8 3.7.
The associated bump to pycodestyle 2.5 caught a few more style nits.
1 parent 5918291 commit 4434dc0
Copy full SHA for 4434dc0

File tree

Expand file treeCollapse file tree

8 files changed

+63
-69
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+63
-69
lines changed

‎.flake8

Copy file name to clipboardExpand all lines: .flake8
+54-54Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -28,61 +28,61 @@ per-file-ignores =
2828
tools/compare_backend_driver_results.py: E501
2929
tools/subset.py: E221, E231, E251, E261, E302, E501, E701
3030

31-
matplotlib/_cm.py: E202, E203, E302
32-
matplotlib/_mathtext_data.py: E203, E261
33-
matplotlib/backend_bases.py: E225
34-
matplotlib/backends/_backend_tk.py: E203, E222, E225, E231, E271, E301, E303, E401, E501, E701
35-
matplotlib/backends/backend_agg.py: E261, E302, E701
36-
matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402
37-
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E261, E501
38-
matplotlib/backends/backend_macosx.py: E231, E261
39-
matplotlib/backends/backend_pgf.py: E303, E731
40-
matplotlib/backends/backend_ps.py: E203, E225, E228, E231, E261, E262, E302, E303, E501, E701
41-
matplotlib/backends/backend_svg.py: E203, E225, E228, E231, E261, E302, E501
42-
matplotlib/backends/qt_editor/formlayout.py: E301, E501
43-
matplotlib/backends/tkagg.py: E231, E302, E701
44-
matplotlib/backends/windowing.py: E301, E302
45-
matplotlib/font_manager.py: E203, E221, E251, E261, E262, E302, E501
46-
matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225, E302
47-
matplotlib/legend_handler.py: E201, E501
48-
matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E231, E251, E261, E301, E302, E303, E402, E501
49-
matplotlib/patheffects.py: E231
50-
matplotlib/projections/geo.py: E203, E221, E231, E261, E502
51-
matplotlib/pylab.py: E501
52-
matplotlib/pyplot.py: E201, E202, E221, E222, E225, E231, E251, E261, E501
53-
matplotlib/rcsetup.py: E203, E225, E261, E302, E501
54-
matplotlib/sphinxext/mathmpl.py: E302
55-
matplotlib/sphinxext/only_directives.py: E302
56-
matplotlib/sphinxext/plot_directive.py: E261, E302, E402
57-
matplotlib/tests/test_image.py: E231
58-
matplotlib/tests/test_mathtext.py: E501
59-
matplotlib/transforms.py: E201, E202, E203, E501
60-
matplotlib/tri/triinterpolate.py: E201, E221
61-
matplotlib/type1font.py: E731
31+
lib/matplotlib/_cm.py: E202, E203, E302
32+
lib/matplotlib/_mathtext_data.py: E203, E261
33+
lib/matplotlib/backend_bases.py: E225
34+
lib/matplotlib/backends/_backend_tk.py: E203, E222, E225, E231, E271, E301, E303, E401, E501, E701
35+
lib/matplotlib/backends/backend_agg.py: E261, E302, E701
36+
lib/matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402
37+
lib/matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E261, E501
38+
lib/matplotlib/backends/backend_macosx.py: E231, E261
39+
lib/matplotlib/backends/backend_pgf.py: E303, E731
40+
lib/matplotlib/backends/backend_ps.py: E203, E225, E228, E231, E261, E262, E302, E303, E501, E701
41+
lib/matplotlib/backends/backend_svg.py: E203, E225, E228, E231, E261, E302, E501
42+
lib/matplotlib/backends/qt_editor/formlayout.py: E301, E501
43+
lib/matplotlib/backends/tkagg.py: E231, E302, E701
44+
lib/matplotlib/backends/windowing.py: E301, E302
45+
lib/matplotlib/font_manager.py: E203, E221, E251, E261, E262, E302, E501
46+
lib/matplotlib/fontconfig_pattern.py: E201, E203, E221, E222, E225, E302
47+
lib/matplotlib/legend_handler.py: E201, E501
48+
lib/matplotlib/mathtext.py: E201, E202, E203, E211, E221, E222, E225, E231, E251, E261, E301, E302, E303, E402, E501
49+
lib/matplotlib/patheffects.py: E231
50+
lib/matplotlib/projections/geo.py: E203, E221, E231, E261, E502
51+
lib/matplotlib/pylab.py: E501
52+
lib/matplotlib/pyplot.py: E201, E202, E221, E222, E225, E231, E251, E261, E501
53+
lib/matplotlib/rcsetup.py: E203, E225, E261, E302, E501
54+
lib/matplotlib/sphinxext/mathmpl.py: E302
55+
lib/matplotlib/sphinxext/only_directives.py: E302
56+
lib/matplotlib/sphinxext/plot_directive.py: E261, E302, E402
57+
lib/matplotlib/tests/test_image.py: E231
58+
lib/matplotlib/tests/test_mathtext.py: E501
59+
lib/matplotlib/transforms.py: E201, E202, E203, E501
60+
lib/matplotlib/tri/triinterpolate.py: E201, E221
61+
lib/matplotlib/type1font.py: E731
6262

63-
mpl_toolkits/__init__.py: E261
64-
mpl_toolkits/axes_grid/axes_rgb.py: E501
65-
mpl_toolkits/axes_grid1/axes_divider.py: E402, E501
66-
mpl_toolkits/axes_grid1/axes_grid.py: E225
67-
mpl_toolkits/axes_grid1/axes_rgb.py: E231
68-
mpl_toolkits/axes_grid1/axes_size.py: E261, E501
69-
mpl_toolkits/axes_grid1/colorbar.py: E225, E231, E261, E262, E302, E303, E501, E701
70-
mpl_toolkits/axes_grid1/inset_locator.py: E501
71-
mpl_toolkits/axes_grid1/mpl_axes.py: E303, E501
72-
mpl_toolkits/axisartist/angle_helper.py: E201, E203, E221, E222, E225, E231, E251, E261, E262, E302, E303, E501
73-
mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701
74-
mpl_toolkits/axisartist/axisline_style.py: E231, E261, E262, E302, E303
75-
mpl_toolkits/axisartist/axislines.py: E225, E231, E261, E303, E501
76-
mpl_toolkits/axisartist/clip_path.py: E225, E302, E303, E501
77-
mpl_toolkits/axisartist/floating_axes.py: E225, E231, E261, E262, E302, E303, E402, E501
78-
mpl_toolkits/axisartist/grid_finder.py: E231, E261, E302, E303, E402
79-
mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E231, E261, E262, E271, E302, E303, E501
80-
mpl_toolkits/mplot3d/art3d.py: E203, E222, E225, E231
81-
mpl_toolkits/mplot3d/axes3d.py: E203, E231, E402, E501, E701
82-
mpl_toolkits/mplot3d/axis3d.py: E231, E302
83-
mpl_toolkits/mplot3d/proj3d.py: E231, E302, E303
84-
mpl_toolkits/tests/test_axes_grid1.py: E201, E202
85-
mpl_toolkits/tests/test_mplot3d.py: E231, E302
63+
lib/mpl_toolkits/__init__.py: E261
64+
lib/mpl_toolkits/axes_grid/axes_rgb.py: E501
65+
lib/mpl_toolkits/axes_grid1/axes_divider.py: E402, E501
66+
lib/mpl_toolkits/axes_grid1/axes_grid.py: E225
67+
lib/mpl_toolkits/axes_grid1/axes_rgb.py: E231
68+
lib/mpl_toolkits/axes_grid1/axes_size.py: E261, E501
69+
lib/mpl_toolkits/axes_grid1/colorbar.py: E225, E231, E261, E262, E302, E303, E501, E701
70+
lib/mpl_toolkits/axes_grid1/inset_locator.py: E501
71+
lib/mpl_toolkits/axes_grid1/mpl_axes.py: E303, E501
72+
lib/mpl_toolkits/axisartist/angle_helper.py: E201, E203, E221, E222, E225, E231, E251, E261, E262, E302, E303, E501
73+
lib/mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701
74+
lib/mpl_toolkits/axisartist/axisline_style.py: E231, E261, E262, E302, E303
75+
lib/mpl_toolkits/axisartist/axislines.py: E225, E231, E261, E303, E501
76+
lib/mpl_toolkits/axisartist/clip_path.py: E225, E302, E303, E501
77+
lib/mpl_toolkits/axisartist/floating_axes.py: E225, E231, E261, E262, E302, E303, E402, E501
78+
lib/mpl_toolkits/axisartist/grid_finder.py: E231, E261, E302, E303, E402
79+
lib/mpl_toolkits/axisartist/grid_helper_curvelinear.py: E225, E231, E261, E262, E271, E302, E303, E501
80+
lib/mpl_toolkits/mplot3d/art3d.py: E203, E222, E225, E231
81+
lib/mpl_toolkits/mplot3d/axes3d.py: E203, E231, E402, E501, E701
82+
lib/mpl_toolkits/mplot3d/axis3d.py: E231, E302
83+
lib/mpl_toolkits/mplot3d/proj3d.py: E231, E302, E303
84+
lib/mpl_toolkits/tests/test_axes_grid1.py: E201, E202
85+
lib/mpl_toolkits/tests/test_mplot3d.py: E231, E302
8686

8787
doc/conf.py: E402, E501
8888
doc/sphinxext/github.py: E302, E501

‎lib/matplotlib/backends/qt_editor/figureoptions.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_editor/figureoptions.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def apply_callback(data):
217217
rgba = mcolors.to_rgba(color)
218218
line.set_alpha(None)
219219
line.set_color(rgba)
220-
if marker is not 'none':
220+
if not isinstance(marker, str) or marker != 'none':
221221
line.set_marker(marker)
222222
line.set_markersize(markersize)
223223
line.set_markerfacecolor(markerfacecolor)

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3665,8 +3665,8 @@ def __init__(self, dataset, bw_method=None):
36653665
elif (isString and bw_method == 'silverman'):
36663666
self.covariance_factor = self.silverman_factor
36673667
elif (np.isscalar(bw_method) and not isString):
3668-
self._bw_method = 'use constant'
3669-
self.covariance_factor = lambda: bw_method
3668+
self._bw_method = 'use constant'
3669+
self.covariance_factor = lambda: bw_method
36703670
elif callable(bw_method):
36713671
self._bw_method = bw_method
36723672
self.covariance_factor = lambda: self._bw_method(self)

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,11 +2176,10 @@ def matshow(A, fignum=None, **kwargs):
21762176
fignum : None or int or False
21772177
If *None*, create a new figure window with automatic numbering.
21782178
2179-
If *fignum* is an integer, draw into the figure with the given number
2179+
If a nonzero integer, draw into the figure with the given number
21802180
(create it if it does not exist).
21812181
2182-
If 0 or *False*, use the current axes if it exists instead of creating
2183-
a new figure.
2182+
If 0, use the current axes (or create one if it does not exist).
21842183
21852184
.. note::
21862185
@@ -2198,7 +2197,7 @@ def matshow(A, fignum=None, **kwargs):
21982197
21992198
"""
22002199
A = np.asanyarray(A)
2201-
if fignum is False or fignum is 0:
2200+
if fignum == 0:
22022201
ax = gca()
22032202
else:
22042203
# Extract actual aspect ratio of array and make appropriately sized figure
@@ -2207,7 +2206,6 @@ def matshow(A, fignum=None, **kwargs):
22072206

22082207
im = ax.matshow(A, **kwargs)
22092208
sci(im)
2210-
22112209
return im
22122210

22132211

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def transform_non_affine(self, a):
108108
# pass. On the other hand, in practice, we want to clip beyond
109109
# np.log10(np.nextafter(0, 1)) ~ -323
110110
# so 1000 seems safe.
111-
out[a <= 0] = -1000
111+
out[a <= 0] = -1000
112112
return out
113113

114114
def __str__(self):

‎lib/matplotlib/tests/test_preprocess_data.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_preprocess_data.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ def test_compiletime_checks():
4141
"""test decorator invocations -> no replacements"""
4242

4343
def func(ax, x, y): pass
44-
4544
def func_args(ax, x, y, *args): pass
46-
4745
def func_kwargs(ax, x, y, **kwargs): pass
48-
4946
def func_no_ax_args(*args, **kwargs): pass
5047

5148
# this is ok

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def _rendercursor(self):
762762

763763
def _notify_submit_observers(self):
764764
for cid, func in self.submit_observers.items():
765-
func(self.text)
765+
func(self.text)
766766

767767
def _release(self, event):
768768
if self.ignore(event):
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Extra pip requirements for the travis flake8 build
22

3-
flake8
4-
flake8-per-file-ignores
3+
flake8>=3.7

0 commit comments

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