Skip to content

Commit 8082710

Browse files
committed
MNT: fix pylint messages on file handling.
1 parent df07955 commit 8082710

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rocketpy/simulation/monte_carlo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ def __setup_files(self, append):
224224
idx_i = len(input_file.readlines())
225225
with open(self._output_file, open_mode, encoding="utf-8") as output_file:
226226
idx_o = len(output_file.readlines())
227-
open(self._error_file, open_mode, encoding="utf-8").close()
227+
with open(self._error_file, open_mode, encoding="utf-8"):
228+
pass
228229

229230
if idx_i != idx_o and not append:
230231
warnings.warn(

0 commit comments

Comments
 (0)