Skip to content

Commit

Permalink
DOC: fix docstring api.types.is_re_compilable (pandas-dev#60419)
Browse files Browse the repository at this point in the history
* fix docstring api.types.is_re_compilable

* fix lint error
  • Loading branch information
sooooooing authored Nov 26, 2024
1 parent b1c2ba7 commit ab757ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.min PR02" \
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
-i "pandas.api.types.is_re_compilable PR07,SA01" \
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
-i "pandas.arrays.IntegerArray SA01" \
-i "pandas.arrays.IntervalArray.length SA01" \
Expand Down
5 changes: 5 additions & 0 deletions pandas/core/dtypes/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,17 @@ def is_re_compilable(obj: object) -> bool:
Parameters
----------
obj : The object to check
The object to check if the object can be compiled into a regex pattern instance.
Returns
-------
bool
Whether `obj` can be compiled as a regex pattern.
See Also
--------
api.types.is_re : Check if the object is a regex pattern instance.
Examples
--------
>>> from pandas.api.types import is_re_compilable
Expand Down

0 comments on commit ab757ff

Please sign in to comment.