Skip to content

Commit b6f2337

Browse files
committed
Revert "Removed InvalidComparison and LossySetItemError from docs"
This reverts commit b9cf502.
1 parent b9cf502 commit b6f2337

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

ci/code_checks.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
6464
MSG='Partially validate docstrings (EX01)' ; echo $MSG
6565
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
6666
pandas.errors.IncompatibilityWarning \
67+
pandas.errors.InvalidComparison \
68+
pandas.errors.LossySetitemError \
6769
pandas.errors.NoBufferPresent \
6870
pandas.errors.OptionError \
6971
pandas.errors.PerformanceWarning \

doc/source/reference/testing.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ Exceptions and warnings
3838
errors.IncompatibilityWarning
3939
errors.IndexingError
4040
errors.InvalidColumnName
41+
errors.InvalidComparison
4142
errors.InvalidIndexError
4243
errors.InvalidVersion
4344
errors.IntCastingNaNError
45+
errors.LossySetitemError
4446
errors.MergeError
4547
errors.NoBufferPresent
4648
errors.NullFrequencyError

scripts/pandas_errors_documented.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@
1818
from collections.abc import Sequence
1919

2020
API_PATH = pathlib.Path("doc/source/reference/testing.rst").resolve()
21-
PRIVATE_ERRORS = frozenset(["InvalidComparison", "LossySetitemError"])
2221

2322

2423
def get_defined_errors(content: str) -> set[str]:
2524
errors = set()
2625
for node in ast.walk(ast.parse(content)):
27-
if (isinstance(node, ast.ClassDef)) and (node.name not in PRIVATE_ERRORS):
26+
if isinstance(node, ast.ClassDef):
2827
errors.add(node.name)
2928
elif isinstance(node, ast.ImportFrom) and node.module != "__future__":
3029
for alias in node.names:
31-
if alias.name not in PRIVATE_ERRORS:
32-
errors.add(alias.name)
30+
errors.add(alias.name)
3331
return errors
3432

3533

0 commit comments

Comments
 (0)