Skip to content

Commit

Permalink
Disable pylint error. (dmlc#6911)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed May 3, 2021
1 parent 59ab729 commit 1bdbd34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-package/xgboost/core.py
Expand Up @@ -2027,7 +2027,7 @@ def dump_model(self, fout, fmap='', with_stats=False, dump_format="text"):
"""
if isinstance(fout, (STRING_TYPES, os.PathLike)):
fout = os.fspath(os.path.expanduser(fout))
fout = open(fout, 'w')
fout = open(fout, 'w') # pylint: disable=consider-using-with
need_close = True
else:
need_close = False
Expand Down

0 comments on commit 1bdbd34

Please sign in to comment.