Skip to content

Commit 4d758bb

Browse files
committed
Making ruff happy
Making ruff happy
1 parent 7fbe148 commit 4d758bb

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

python/datafusion/functions.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
Expr,
3030
SortExpr,
3131
SortKey,
32+
_to_raw_literal_expr,
3233
expr_list_to_raw_expr_list,
3334
sort_list_to_raw_sort_list,
3435
sort_or_default,
35-
_to_raw_literal_expr,
3636
)
3737

3838
__all__ = [
@@ -1471,9 +1471,6 @@ def regexp_like(
14711471
>>> result.collect_column("m")[0].as_py()
14721472
True
14731473
"""
1474-
# if flags is not None:
1475-
# flags = flags.expr
1476-
# return Expr(f.regexp_like(string.expr, regex.expr, flags))
14771474
flags = _to_raw_literal_expr(flags) if flags is not None else None
14781475
return Expr(f.regexp_like(string.expr, _to_raw_literal_expr(regex), flags))
14791476

@@ -1508,9 +1505,6 @@ def regexp_match(
15081505
>>> result.collect_column("m")[0].as_py()
15091506
['hello']
15101507
"""
1511-
# if flags is not None:
1512-
# flags = flags.expr
1513-
# return Expr(f.regexp_match(string.expr, regex.expr, flags))
15141508
flags = _to_raw_literal_expr(flags) if flags is not None else None
15151509
return Expr(f.regexp_match(string.expr, _to_raw_literal_expr(regex), flags))
15161510

@@ -1553,9 +1547,6 @@ def regexp_replace(
15531547
>>> result.collect_column("r")[0].as_py()
15541548
'aX bX cX'
15551549
"""
1556-
# if flags is not None:
1557-
# flags = flags.expr
1558-
# return Expr(f.regexp_replace(string.expr, pattern.expr, replacement.expr, flags))
15591550
flags = _to_raw_literal_expr(flags) if flags is not None else None
15601551
pattern = _to_raw_literal_expr(pattern)
15611552
replacement = _to_raw_literal_expr(replacement)
@@ -1594,10 +1585,6 @@ def regexp_count(
15941585
>>> result.collect_column("c")[0].as_py()
15951586
1
15961587
"""
1597-
# if flags is not None:
1598-
# flags = flags.expr
1599-
# start = start.expr if start is not None else start
1600-
# return Expr(f.regexp_count(string.expr, pattern.expr, start, flags))
16011588
flags = _to_raw_literal_expr(flags) if flags is not None else None
16021589
start = _to_raw_literal_expr(start) if start is not None else None
16031590
return Expr(
@@ -1659,10 +1646,6 @@ def regexp_instr(
16591646
>>> result.collect_column("pos")[0].as_py()
16601647
1
16611648
"""
1662-
# start = start.expr if start is not None else None
1663-
# n = n.expr if n is not None else None
1664-
# flags = flags.expr if flags is not None else None
1665-
# sub_expr = sub_expr.expr if sub_expr is not None else None
16661649
regex = _to_raw_literal_expr(regex)
16671650
start = _to_raw_literal_expr(start) if start is not None else None
16681651
n = _to_raw_literal_expr(n) if n is not None else None

0 commit comments

Comments
 (0)