From 111ff84bb958cc7b13a060d9539f83b67ced8f02 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 30 Sep 2024 21:29:49 +0530 Subject: [PATCH] DOC: fix SA01, ES01 for pandas.errors.ClosedFileError (#59924) --- ci/code_checks.sh | 1 - pandas/errors/__init__.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index fa23adca6d61e..42eedfe8e223b 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -159,7 +159,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.errors.CSSWarning SA01" \ -i "pandas.errors.CategoricalConversionWarning SA01" \ -i "pandas.errors.ChainedAssignmentError SA01" \ - -i "pandas.errors.ClosedFileError SA01" \ -i "pandas.errors.DataError SA01" \ -i "pandas.errors.DuplicateLabelError SA01" \ -i "pandas.errors.IntCastingNaNError SA01" \ diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index b9ceae341afd3..46e090cc3a589 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -615,6 +615,16 @@ class ClosedFileError(Exception): """ Exception is raised when trying to perform an operation on a closed HDFStore file. + ``ClosedFileError`` is specific to operations on ``HDFStore`` objects. Once an + HDFStore is closed, its resources are no longer available, and any further attempt + to access data or perform file operations will raise this exception. + + See Also + -------- + HDFStore.close : Closes the PyTables file handle. + HDFStore.open : Opens the file in the specified mode. + HDFStore.is_open : Returns a boolean indicating whether the file is open. + Examples -------- >>> store = pd.HDFStore("my-store", "a") # doctest: +SKIP