File tree 3 files changed +4
-6
lines changed
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
64
64
MSG=' Partially validate docstrings (EX01)' ; echo $MSG
65
65
$BASE_DIR /scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
66
66
pandas.errors.IncompatibilityWarning \
67
- pandas.errors.InvalidComparison \
68
- pandas.errors.LossySetitemError \
69
67
pandas.errors.NoBufferPresent \
70
68
pandas.errors.OptionError \
71
69
pandas.errors.PerformanceWarning \
Original file line number Diff line number Diff line change @@ -38,11 +38,9 @@ Exceptions and warnings
38
38
errors.IncompatibilityWarning
39
39
errors.IndexingError
40
40
errors.InvalidColumnName
41
- errors.InvalidComparison
42
41
errors.InvalidIndexError
43
42
errors.InvalidVersion
44
43
errors.IntCastingNaNError
45
- errors.LossySetitemError
46
44
errors.MergeError
47
45
errors.NoBufferPresent
48
46
errors.NullFrequencyError
Original file line number Diff line number Diff line change 18
18
from collections .abc import Sequence
19
19
20
20
API_PATH = pathlib .Path ("doc/source/reference/testing.rst" ).resolve ()
21
+ PRIVATE_ERRORS = frozenset (["InvalidComparison" , "LossySetitemError" ])
21
22
22
23
23
24
def get_defined_errors (content : str ) -> set [str ]:
24
25
errors = set ()
25
26
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 ):
27
28
errors .add (node .name )
28
29
elif isinstance (node , ast .ImportFrom ) and node .module != "__future__" :
29
30
for alias in node .names :
30
- errors .add (alias .name )
31
+ if alias .name not in PRIVATE_ERRORS :
32
+ errors .add (alias .name )
31
33
return errors
32
34
33
35
You can’t perform that action at this time.
0 commit comments