Skip to content

Commit b9cf502

Browse files
committed
Removed InvalidComparison and LossySetItemError from docs
1 parent d4889bc commit b9cf502

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ci/code_checks.sh

-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ 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 \
6967
pandas.errors.NoBufferPresent \
7068
pandas.errors.OptionError \
7169
pandas.errors.PerformanceWarning \

doc/source/reference/testing.rst

-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ Exceptions and warnings
3838
errors.IncompatibilityWarning
3939
errors.IndexingError
4040
errors.InvalidColumnName
41-
errors.InvalidComparison
4241
errors.InvalidIndexError
4342
errors.InvalidVersion
4443
errors.IntCastingNaNError
45-
errors.LossySetitemError
4644
errors.MergeError
4745
errors.NoBufferPresent
4846
errors.NullFrequencyError

scripts/pandas_errors_documented.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@
1818
from collections.abc import Sequence
1919

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

2223

2324
def get_defined_errors(content: str) -> set[str]:
2425
errors = set()
2526
for node in ast.walk(ast.parse(content)):
26-
if isinstance(node, ast.ClassDef):
27+
if (isinstance(node, ast.ClassDef)) and (node.name not in PRIVATE_ERRORS):
2728
errors.add(node.name)
2829
elif isinstance(node, ast.ImportFrom) and node.module != "__future__":
2930
for alias in node.names:
30-
errors.add(alias.name)
31+
if alias.name not in PRIVATE_ERRORS:
32+
errors.add(alias.name)
3133
return errors
3234

3335

0 commit comments

Comments
 (0)