Merge pull request #25147 from ksunden/ruff_config · matplotlib/matplotlib@f9de8aa · GitHub
Skip to content

Commit f9de8aa

Browse files
authored
Merge pull request #25147 from ksunden/ruff_config
Add ruff config to pyproject.toml for devs who are interested
2 parents eeef80f + f19b57c commit f9de8aa

7 files changed

Lines changed: 126 additions & 28 deletions

File tree

.flake8

Lines changed: 7 additions & 21 deletions

lib/matplotlib/legend_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def __init__(self, xpad=0., ypad=0., update_func=None):
6363
"""
6464
Parameters
6565
----------
66-
6766
xpad : float, optional
6867
Padding in x-direction.
6968
ypad : float, optional

lib/matplotlib/scale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self, axis):
9898
# constructor docstring, which would otherwise end up interpolated into
9999
# the docstring of Axis.set_scale.
100100
"""
101-
"""
101+
""" # noqa: D419
102102

103103
def set_default_locators_and_formatters(self, axis):
104104
# docstring inherited

lib/matplotlib/tests/test_backend_qt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_sigint(target, kwargs):
128128
try:
129129
proc.wait_for('DRAW')
130130
stdout, _ = proc.communicate(timeout=_test_timeout)
131-
except:
131+
except Exception:
132132
proc.kill()
133133
stdout, _ = proc.communicate()
134134
raise
@@ -182,7 +182,7 @@ def test_other_signal_before_sigint(target, kwargs):
182182
proc.wait_for('SIGUSR1')
183183
os.kill(proc.pid, signal.SIGINT)
184184
stdout, _ = proc.communicate(timeout=_test_timeout)
185-
except:
185+
except Exception:
186186
proc.kill()
187187
stdout, _ = proc.communicate()
188188
raise

lib/matplotlib/tests/test_font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_get_font_names():
317317
font = ft2font.FT2Font(path)
318318
prop = ttfFontProperty(font)
319319
ttf_fonts.append(prop.name)
320-
except:
320+
except Exception:
321321
pass
322322
available_fonts = sorted(list(set(ttf_fonts)))
323323
mpl_font_names = sorted(fontManager.get_font_names())

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Text3D(mtext.Text):
9191
----------------
9292
**kwargs
9393
All other parameters are passed on to `~matplotlib.text.Text`.
94-
"""
94+
"""
9595

9696
def __init__(self, x=0, y=0, z=0, text='', zdir='z', **kwargs):
9797
mtext.Text.__init__(self, x, y, text, **kwargs)

pyproject.toml

Lines changed: 114 additions & 1 deletion

0 commit comments

Comments
 (0)