@@ -313,7 +313,7 @@ def _str_contains(
313
313
return result
314
314
315
315
def _str_startswith (
316
- self , pat : str | tuple [str , ...], na : Scalar | None = lib .no_default
316
+ self , pat : str | tuple [str , ...], na : Scalar | lib . NoDefault = lib .no_default
317
317
):
318
318
if isinstance (pat , str ):
319
319
result = pc .starts_with (self ._pa_array , pattern = pat )
@@ -337,7 +337,9 @@ def _str_startswith(
337
337
result = result .fill_null (na )
338
338
return self ._predicate_result_converter (result )
339
339
340
- def _str_endswith (self , pat : str | tuple [str , ...], na : Scalar | None = None ):
340
+ def _str_endswith (
341
+ self , pat : str | tuple [str , ...], na : Scalar | lib .NoDefault = lib .no_default
342
+ ):
341
343
if isinstance (pat , str ):
342
344
result = pc .ends_with (self ._pa_array , pattern = pat )
343
345
else :
@@ -389,14 +391,18 @@ def _str_match(
389
391
pat : str ,
390
392
case : bool = True ,
391
393
flags : int = 0 ,
392
- na : Scalar | None = lib .no_default ,
394
+ na : Scalar | lib . NoDefault = lib .no_default ,
393
395
):
394
396
if not pat .startswith ("^" ):
395
397
pat = f"^{ pat } "
396
398
return self ._str_contains (pat , case , flags , na , regex = True )
397
399
398
400
def _str_fullmatch (
399
- self , pat , case : bool = True , flags : int = 0 , na : Scalar | None = lib .no_default
401
+ self ,
402
+ pat ,
403
+ case : bool = True ,
404
+ flags : int = 0 ,
405
+ na : Scalar | lib .NoDefault = lib .no_default ,
400
406
):
401
407
if not pat .endswith ("$" ) or pat .endswith ("\\ $" ):
402
408
pat = f"{ pat } $"
0 commit comments