Skip to content

Commit 7bb0d54

Browse files
committed
fix: flake8
1 parent a71d083 commit 7bb0d54

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/matplotlib/tests/test_texmanager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def test_font_selection(rc, preamble, family):
4444
assert [*re.findall(r"\\\w+family", src)] == [family]
4545

4646
def test_usetex_with_underscore():
47-
plt.rcParams['text.usetex'] = True
48-
df = {'a_b': range(5)[::-1], 'c': range(5)}
47+
plt.rcParams["text.usetex"] = True
48+
df = {"a_b": range(5)[::-1], "c": range(5)}
4949
fig, ax = plt.subplots()
50-
ax.plot('c', 'a_b', data=df)
50+
ax.plot("c", "a_b", data=df)
5151
ax.legend()
52-
ax.text(0, 0, 'foo_bar', usetex=True)
52+
ax.text(0, 0, "foo_bar", usetex=True)
5353
plt.draw() # TeX rendering is done at draw time

lib/matplotlib/texmanager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,10 @@ def make_dvi(self, tex, fontsize):
250250
# final output dir ensures that they are on the same filesystem,
251251
# and thus replace() works atomically.
252252
with TemporaryDirectory(dir=Path(dvifile).parent) as tmpdir:
253-
shutil.copy(
254-
cbook._get_data_path(Path("latex").joinpath("underscore.sty")), tmpdir)
253+
shutil.copy(cbook._get_data_path(
254+
Path("latex").joinpath("underscore.sty")),
255+
tmpdir,
256+
)
255257
self._run_checked_subprocess(
256258
["latex", "-interaction=nonstopmode", "--halt-on-error",
257259
texfile], tex, cwd=tmpdir)

0 commit comments

Comments
 (0)