Skip to content

Commit 1221a0b

Browse files
committed
UNPICK sync to hint-1237
1 parent 4944288 commit 1221a0b

File tree

3 files changed

+24
-40
lines changed

3 files changed

+24
-40
lines changed

examples/datafusion-ffi-example/python/tests/_test_type_checking.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

pyproject.toml

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ asyncio_default_fixture_loop_scope = "function"
6969

7070
# Enable docstring linting using the google style guide
7171
[tool.ruff.lint]
72-
select = ["ALL"]
72+
select = ["ALL" ]
7373
ignore = [
74-
"A001", # Allow using words like min as variable names
75-
"A002", # Allow using words like filter as variable names
76-
"ANN401", # Allow Any for wrapper classes
77-
"COM812", # Recommended to ignore these rules when using with ruff-format
78-
"FIX002", # Allow TODO lines - consider removing at some point
79-
"FBT001", # Allow boolean positional args
80-
"FBT002", # Allow boolean positional args
81-
"ISC001", # Recommended to ignore these rules when using with ruff-format
82-
"SLF001", # Allow accessing private members
74+
"A001", # Allow using words like min as variable names
75+
"A002", # Allow using words like filter as variable names
76+
"ANN401", # Allow Any for wrapper classes
77+
"COM812", # Recommended to ignore these rules when using with ruff-format
78+
"FIX002", # Allow TODO lines - consider removing at some point
79+
"FBT001", # Allow boolean positional args
80+
"FBT002", # Allow boolean positional args
81+
"ISC001", # Recommended to ignore these rules when using with ruff-format
82+
"SLF001", # Allow accessing private members
8383
"TD002",
84-
"TD003", # Allow TODO lines
85-
"UP007", # Disallowing Union is pedantic
84+
"TD003", # Allow TODO lines
85+
"UP007", # Disallowing Union is pedantic
8686
# TODO: Enable all of the following, but this PR is getting too large already
8787
"PLR0913",
8888
"TRY003",
@@ -97,6 +97,7 @@ ignore = [
9797
"DTZ007",
9898
"RUF015",
9999
"A005",
100+
"TC001",
100101
"UP035",
101102
]
102103

@@ -128,27 +129,20 @@ extend-allowed-calls = ["lit", "datafusion.lit"]
128129
]
129130
"examples/*" = ["D", "W505", "E501", "T201", "S101"]
130131
"dev/*" = ["D", "E", "T", "S", "PLR", "C", "SIM", "UP", "EXE", "N817"]
131-
"benchmarks/*" = [
132-
"D",
133-
"F",
134-
"T",
135-
"BLE",
136-
"FURB",
137-
"PLR",
138-
"E",
139-
"TD",
140-
"TRY",
141-
"S",
142-
"SIM",
143-
"EXE",
144-
"UP",
145-
]
132+
"benchmarks/*" = ["D", "F", "T", "BLE", "FURB", "PLR", "E", "TD", "TRY", "S", "SIM", "EXE", "UP"]
146133
"docs/*" = ["D"]
147134

148135
[tool.codespell]
149-
skip = ["./target", "uv.lock", "./python/tests/test_functions.py"]
136+
skip = [
137+
"./target",
138+
"uv.lock",
139+
"./python/tests/test_functions.py"
140+
]
150141
count = true
151-
ignore-words-list = ["ans", "IST"]
142+
ignore-words-list = [
143+
"ans",
144+
"IST"
145+
]
152146

153147
[dependency-groups]
154148
dev = [

python/datafusion/user_defined.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ def __datafusion_scalar_udf__(self) -> object: ... # noqa: D105
101101

102102
def _is_pycapsule(value: object) -> TypeGuard[_PyCapsule]:
103103
"""Return ``True`` when ``value`` is a CPython ``PyCapsule``."""
104-
105-
type_name = type(value).__name__
106-
# CPython exposes capsule objects with the type name "capsule"
107-
return type_name in {"PyCapsule", "capsule"}
104+
return value.__class__.__name__ == "PyCapsule"
108105

109106

110107
class ScalarUDF:

0 commit comments

Comments
 (0)