Skip to content

Commit b7027d5

Browse files
committed
Enabled ruff rule PT001 and ANN204
1 parent 3dcf7c7 commit b7027d5

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/python-udaf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyAccumulator(Accumulator):
2626
Interface of a user-defined accumulation.
2727
"""
2828

29-
def __init__(self):
29+
def __init__(self) -> None:
3030
self._sum = pyarrow.scalar(0.0)
3131

3232
def update(self, values: pyarrow.Array) -> None:

examples/sql-using-python-udaf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MyAccumulator(Accumulator):
2525
Interface of a user-defined accumulation.
2626
"""
2727

28-
def __init__(self):
28+
def __init__(self) -> None:
2929
self._sum = pa.scalar(0.0)
3030

3131
def update(self, values: pa.Array) -> None:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ ignore = [
8080
"TD003", # Allow TODO lines
8181
"UP007", # Disallowing Union is pedantic
8282
# TODO: Enable all of the following, but this PR is getting too large already
83-
"PT001",
84-
"ANN204",
83+
#"PT001",
84+
# "ANN204",
8585
"B008",
8686
"EM101",
8787
"PLR0913",

python/datafusion/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def over(self, window: Window) -> Expr:
610610

611611

612612
class ExprFuncBuilder:
613-
def __init__(self, builder: expr_internal.ExprFuncBuilder):
613+
def __init__(self, builder: expr_internal.ExprFuncBuilder) -> None:
614614
self.builder = builder
615615

616616
def order_by(self, *exprs: Expr) -> ExprFuncBuilder:

0 commit comments

Comments
 (0)