Skip to content

Commit 4e80016

Browse files
committed
Verify all python arguments ahve type annotations
1 parent c3dff93 commit 4e80016

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ignore = [
8989
"PLR0913", # Allow many arguments in function definition
9090
"PD901", # Allow variable name df
9191
# TODO: Enable all of the following, but this PR is getting too large already
92-
"ANN001",
92+
# "ANN001",
9393
"ANN202",
9494
"PTH",
9595
"N812",
@@ -127,11 +127,11 @@ extend-allowed-calls = ["lit", "datafusion.lit"]
127127
"PLR0913",
128128
"PT004",
129129
]
130-
"examples/*" = ["D", "W505", "E501", "T201", "S101", "PLR2004"]
131-
"dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817", "ERA001"]
132-
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP", "ERA001"]
130+
"examples/*" = ["D", "W505", "E501", "T201", "S101", "PLR2004", "ANN001"]
131+
"dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817", "ERA001", "ANN001"]
132+
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP", "ERA001", "ANN001"]
133133
"docs/*" = ["D"]
134-
"docs/source/conf.py" = ["ERA001"]
134+
"docs/source/conf.py" = ["ERA001", "ANN001"]
135135

136136
[tool.codespell]
137137
skip = [

python/datafusion/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,25 @@
119119
]
120120

121121

122-
def literal(value) -> Expr:
122+
def literal(value: Any) -> Expr:
123123
"""Create a literal expression."""
124124
return Expr.literal(value)
125125

126126

127-
def string_literal(value):
127+
def string_literal(value: str):
128128
"""Create a UTF8 literal expression.
129129
130130
It differs from `literal` which creates a UTF8view literal.
131131
"""
132132
return Expr.string_literal(value)
133133

134134

135-
def str_lit(value):
135+
def str_lit(value: str):
136136
"""Alias for `string_literal`."""
137137
return string_literal(value)
138138

139139

140-
def lit(value) -> Expr:
140+
def lit(value: Any) -> Expr:
141141
"""Create a literal expression."""
142142
return Expr.literal(value)
143143

0 commit comments

Comments
 (0)