Disable pylint error. (#6911)

This commit is contained in:
Jiaming Yuan
2021-04-29 01:01:37 +08:00
committed by GitHub
parent 8760ec4827
commit ef473b1f09

View File

@@ -2093,7 +2093,7 @@ class Booster(object):
"""
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