From 48d5d4d1c0c1627580e8802f914a935b39f7a17a Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 30 Sep 2024 11:02:11 +0530 Subject: [PATCH] DOC: fix SA01, ES01 for pandas.errors.ClosedFileError --- 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 2b3e83d64ab21..cea4023fec7a6 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -160,7 +160,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