fix lint errors in core

This commit is contained in:
terrytangyuan 2015-12-11 18:37:13 -06:00
parent 7be496a051
commit a7e79e089b
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
ignore=tests ignore=tests
disable=invalid-name,wildcard-import,too-many-arguments,attribute-defined-outside-init,no-member,too-many-instance-attributes,too-few-public-methods,import-error,super-on-old-class,fixme,too-many-nested-blocks unexpected-special-method-signature,too-many-nested-blocks,consider-using-enumerate
dummy-variables-rgx=(unused|)_.* dummy-variables-rgx=(unused|)_.*

View File

@ -523,7 +523,7 @@ class DMatrix(object):
feature_names : list or None feature_names : list or None
Labels for features. None will reset existing feature names Labels for features. None will reset existing feature names
""" """
if not feature_names is None: if feature_names is not None:
# validate feature name # validate feature name
if not isinstance(feature_names, list): if not isinstance(feature_names, list):
feature_names = list(feature_names) feature_names = list(feature_names)
@ -554,7 +554,7 @@ class DMatrix(object):
feature_types : list or None feature_types : list or None
Labels for features. None will reset existing feature names Labels for features. None will reset existing feature names
""" """
if not feature_types is None: if feature_types is not None:
if self.feature_names is None: if self.feature_names is None:
msg = 'Unable to set feature types before setting names' msg = 'Unable to set feature types before setting names'