Skip to content

Backport PR #11963 on branch v3.0.x #11968

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
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
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ per-file-ignores =
matplotlib/backend_bases.py: E225
matplotlib/backends/_backend_tk.py: E203, E222, E225, E231, E271, E301, E303, E401, E501, E701
matplotlib/backends/backend_agg.py: E261, E302, E701
matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402, E711
matplotlib/backends/backend_cairo.py: E203, E221, E261, E303, E402
matplotlib/backends/backend_gtk3.py: E203, E221, E222, E225, E251, E261, E501
matplotlib/backends/backend_macosx.py: E231, E261
matplotlib/backends/backend_pgf.py: E303, E731
Expand Down Expand Up @@ -70,7 +70,7 @@ per-file-ignores =
mpl_toolkits/axes_grid1/inset_locator.py: E501
mpl_toolkits/axes_grid1/mpl_axes.py: E303, E501
mpl_toolkits/axisartist/angle_helper.py: E201, E203, E221, E222, E225, E231, E251, E261, E262, E302, E303, E501
mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701, E711
mpl_toolkits/axisartist/axis_artist.py: E201, E202, E221, E225, E228, E231, E251, E261, E262, E302, E303, E402, E501, E701
mpl_toolkits/axisartist/axisline_style.py: E231, E261, E262, E302, E303
mpl_toolkits/axisartist/axislines.py: E225, E231, E261, E303, E501
mpl_toolkits/axisartist/clip_path.py: E225, E302, E303, E501
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def set_clip_path(self, path):

def set_dashes(self, offset, dashes):
self._dashes = offset, dashes
if dashes == None:
if dashes is None:
self.ctx.set_dash([], 0) # switch dashes off
else:
self.ctx.set_dash(
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
"/Network/Library/Fonts/",
"/System/Library/Fonts/",
# fonts installed via MacPorts
"/opt/local/share/fonts"
""
"/opt/local/share/fonts",
"",
]

if not USE_FONTCONFIG and sys.platform != 'win32':
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ def _validate_linestyle(ls):
'font.cursive': [['Apple Chancery', 'Textile', 'Zapf Chancery',
'Sand', 'Script MT', 'Felipa', 'cursive'],
validate_stringlist],
'font.fantasy': [['Comic Sans MS', 'Chicago', 'Charcoal', 'Impact'
'font.fantasy': [['Comic Sans MS', 'Chicago', 'Charcoal', 'Impact',
'Western', 'Humor Sans', 'xkcd', 'fantasy'],
validate_stringlist],
'font.monospace': [['DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
Expand Down
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/axisartist/axis_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def set_axisline_style(self, axisline_style=None, **kw):
available styles as a list of strings.
"""

if axisline_style==None:
if axisline_style is None:
return AxislineStyle.pprint_styles()

if isinstance(axisline_style, AxislineStyle._Base):
Expand Down
3 changes: 1 addition & 2 deletions lib/mpl_toolkits/mplot3d/art3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def set_3d_properties(self, zs=0, zdir='z'):
try:
# If *zs* is a list or array, then this will fail and
# just proceed to juggle_axes().
zs = float(zs)
zs = [zs for x in xs]
zs = np.full_like(xs, fill_value=float(zs))
except TypeError:
pass
self._verts3d = juggle_axes(xs, ys, zs, zdir)
Expand Down