diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 865f6d46cfee0..9bf106e1cc065 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -79,8 +79,8 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06 + MSG='Validate docstrings (EX02, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG + $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06 RET=$(($RET + $?)) ; echo $MSG "DONE" MSG='Partially validate docstrings (EX01)' ; echo $MSG @@ -557,16 +557,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DataFrame.__dataframe__ RET=$(($RET + $?)) ; echo $MSG "DONE" - MSG='Partially validate docstrings (EX02)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \ - pandas.DataFrame.plot.line \ - pandas.Series.plot.line \ - pandas.api.types.is_datetime64_any_dtype \ - pandas.api.types.is_datetime64_ns_dtype \ - pandas.api.types.is_datetime64tz_dtype \ - pandas.plotting.parallel_coordinates - RET=$(($RET + $?)) ; echo $MSG "DONE" - fi ### DOCUMENTATION NOTEBOOKS ### diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 874b567f65937..678b3d6752f02 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -322,6 +322,7 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.api.types import is_datetime64tz_dtype >>> is_datetime64tz_dtype(object) False >>> is_datetime64tz_dtype([1, 2, 3]) @@ -331,6 +332,7 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool: >>> is_datetime64tz_dtype(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern")) True + >>> from pandas.core.dtypes.dtypes import DatetimeTZDtype >>> dtype = DatetimeTZDtype("ns", tz="US/Eastern") >>> s = pd.Series([], dtype=dtype) >>> is_datetime64tz_dtype(dtype) @@ -886,6 +888,8 @@ def is_datetime64_any_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.api.types import is_datetime64_any_dtype + >>> from pandas.core.dtypes.dtypes import DatetimeTZDtype >>> is_datetime64_any_dtype(str) False >>> is_datetime64_any_dtype(int) @@ -928,6 +932,8 @@ def is_datetime64_ns_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.api.types import is_datetime64_ns_dtype + >>> from pandas.core.dtypes.dtypes import DatetimeTZDtype >>> is_datetime64_ns_dtype(str) False >>> is_datetime64_ns_dtype(int) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 51c95808506a8..3d763ebb7a11f 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -989,8 +989,7 @@ def __call__(self, *args, **kwargs): :context: close-figs >>> s = pd.Series([1, 3, 2]) - >>> s.plot.line() - + >>> s.plot.line() # doctest: +SKIP .. plot:: :context: close-figs diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 791e7c0214b58..903dce9f040c3 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -447,8 +447,7 @@ def parallel_coordinates( ... ) >>> pd.plotting.parallel_coordinates( ... df, 'Name', color=('#556270', '#4ECDC4', '#C7F464') - ... ) - + ... ) # doctest: +SKIP """ plot_backend = _get_plot_backend("matplotlib") return plot_backend.parallel_coordinates(