diff --git a/python-package/.pylintrc b/python-package/.pylintrc index 58dc6d56f..4e1bee1f8 100644 --- a/python-package/.pylintrc +++ b/python-package/.pylintrc @@ -2,7 +2,7 @@ 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|)_.* diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 85a81d678..3078dc903 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -523,7 +523,7 @@ class DMatrix(object): feature_names : list or None Labels for features. None will reset existing feature names """ - if not feature_names is None: + if feature_names is not None: # validate feature name if not isinstance(feature_names, list): feature_names = list(feature_names) @@ -554,7 +554,7 @@ class DMatrix(object): feature_types : list or None 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: msg = 'Unable to set feature types before setting names'