diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index 2db850ac03a7..0f481ddf1a61 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -353,7 +353,7 @@ def proxy(self) -> "_ProxyDMatrix": def _handle_exception(self, fn: Callable, dft_ret): try: return fn() - except Exception as e: + except Exception as e: # pylint: disable=broad-except # Defer the exception in order to return 0 and stop the iteration. # Exception inside a ctype callback function has no effect except # for printing to stderr (doesn't stop the execution).