Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9128a2

Browse files
committed
pep8
1 parent 3fa4701 commit e9128a2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

lib/matplotlib/backends/backend_pgf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,9 @@ def _write_header(self, width_inches, height_inches):
10711071
hyperref_options = ''
10721072
for k, v in infoDict.items():
10731073
if k not in supported_keys:
1074-
raise ValueError('Not a supported pdf metadata field: "{}"'.format(k))
1074+
raise ValueError(
1075+
'Not a supported pdf metadata field: "{}"'.format(k)
1076+
)
10751077
hyperref_options += 'pdf' + k + '={' + str(v) + '},'
10761078

10771079
latex_preamble = get_preamble()
@@ -1138,8 +1140,9 @@ def _run_latex(self):
11381140
% (texcommand, e.output.decode('utf-8')))
11391141

11401142
# copy file contents to target
1141-
with open(self._fname_pdf, "rb") as fh_src, open(self._outputfile, "wb") as fh:
1142-
shutil.copyfileobj(fh_src, fh)
1143+
with open(self._fname_pdf, "rb") as fh_src:
1144+
with open(self._outputfile, "wb") as fh:
1145+
shutil.copyfileobj(fh_src, fh)
11431146

11441147
def savefig(self, figure=None, **kwargs):
11451148
"""

0 commit comments

Comments
 (0)