Skip to content

Commit

Permalink
Merge pull request #3575 from DimitriPapadopoulos/io.open
Browse files Browse the repository at this point in the history
[REF] io.open() → open()
  • Loading branch information
effigies authored May 28, 2023
2 parents 6cbbaff + c8f4c42 commit 75796d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nipype/sphinxext/plot_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def run(self):
else:
function_name = None

with io.open(source_file_name, "r", encoding="utf-8") as fd:
with open(source_file_name, "r", encoding="utf-8") as fd:
code = fd.read()
output_base = os.path.basename(source_file_name)
else:
Expand Down Expand Up @@ -438,7 +438,7 @@ def run(self):

# copy script (if necessary)
target_name = os.path.join(dest_dir, output_base + source_ext)
with io.open(target_name, "w", encoding="utf-8") as f:
with open(target_name, "w", encoding="utf-8") as f:
if source_file_name == rst_file:
code_escaped = unescape_doctest(code)
else:
Expand Down

0 comments on commit 75796d5

Please sign in to comment.