From 296addacc1806324291e613e7a6e2e16e177bfe3 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Nov 2024 16:11:34 +0900 Subject: [PATCH 1/3] add api.types.pandas_dtype PR07, RT03, SA01 docstrings --- pandas/core/dtypes/common.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 98c770ec4a8b0..056e75c25e7bb 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -1785,16 +1785,22 @@ def pandas_dtype(dtype) -> DtypeObj: Parameters ---------- - dtype : object to be converted + dtype : object + The object to be converted into a dtype. Returns ------- np.dtype or a pandas dtype + The converted dtype, which can be either a numpy dtype or a pandas dtype. Raises ------ TypeError if not a dtype + See Also + ------ + api.types.is_dtype : Return true if the condition is satisfied for the arr_or_dtype. + Examples -------- >>> pd.api.types.pandas_dtype(int) From 4d544ffc141d293e4b780e9b357879d33f57510d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Nov 2024 16:18:24 +0900 Subject: [PATCH 2/3] remove from code_checks.sh --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index fae1a7abba6a8..53690e9b78b8a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.resolution PR02" \ -i "pandas.Timestamp.tzinfo GL08" \ -i "pandas.api.types.is_re_compilable PR07,SA01" \ - -i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \ -i "pandas.arrays.ArrowExtensionArray PR07,SA01" \ -i "pandas.arrays.IntegerArray SA01" \ -i "pandas.arrays.IntervalArray.length SA01" \ From ecc866935ca87f7206eabc9ffd8f8858d17d953f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Nov 2024 16:48:51 +0900 Subject: [PATCH 3/3] edit see also --- pandas/core/dtypes/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 056e75c25e7bb..8f93b1a397c1f 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -1798,7 +1798,7 @@ def pandas_dtype(dtype) -> DtypeObj: TypeError if not a dtype See Also - ------ + -------- api.types.is_dtype : Return true if the condition is satisfied for the arr_or_dtype. Examples