Determine if the object is a str-like or array of str-like.
(pat: Any)
| 88 | |
| 89 | |
| 90 | def _contains_str_like(pat: Any) -> bool: |
| 91 | """Determine if the object is a str-like or array of str-like.""" |
| 92 | if isinstance(pat, str | bytes): |
| 93 | return True |
| 94 | |
| 95 | if not hasattr(pat, "dtype"): |
| 96 | return False |
| 97 | |
| 98 | return pat.dtype.kind in ["U", "S"] |
| 99 | |
| 100 | |
| 101 | def _contains_compiled_re(pat: Any) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…