Fix with latest pylint. (#7071)
This commit is contained in:
parent
a5d222fcdb
commit
93f3acdef9
@ -301,12 +301,16 @@ if __name__ == '__main__':
|
||||
# - pip install . -e
|
||||
# - python setup.py develop # same as above
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
with open(os.path.join(CURRENT_DIR, 'README.rst'), encoding='utf-8') as fd:
|
||||
description = fd.read()
|
||||
with open(os.path.join(CURRENT_DIR, 'xgboost/VERSION')) as fd:
|
||||
version = fd.read().strip()
|
||||
|
||||
setup(name='xgboost',
|
||||
version=open(os.path.join(
|
||||
CURRENT_DIR, 'xgboost/VERSION')).read().strip(),
|
||||
version=version,
|
||||
description="XGBoost Python Package",
|
||||
long_description=open(os.path.join(CURRENT_DIR, 'README.rst'),
|
||||
encoding='utf-8').read(),
|
||||
long_description=description,
|
||||
long_description_content_type="text/x-rst",
|
||||
install_requires=[
|
||||
'numpy',
|
||||
|
||||
@ -502,7 +502,7 @@ def cv(params, dtrain, num_boost_round=10, nfold=3, stratified=False, folds=None
|
||||
results[key + '-std'].append(std)
|
||||
|
||||
if should_break:
|
||||
for k in results:
|
||||
for k in results.keys(): # pylint: disable=consider-iterating-dictionary
|
||||
results[k] = results[k][:(booster.best_iteration + 1)]
|
||||
break
|
||||
if as_pandas:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user