We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fb0349 commit 52505a8Copy full SHA for 52505a8
python/datafusion/user_defined.py
@@ -41,7 +41,13 @@
41
from datafusion.expr import Expr
42
43
if TYPE_CHECKING:
44
+ from _typeshed import CapsuleType as _PyCapsule
45
+
46
_R = TypeVar("_R", bound=pa.DataType)
47
+else:
48
49
+ class _PyCapsule:
50
+ """Lightweight typing proxy for CPython ``PyCapsule`` objects."""
51
52
53
class Volatility(Enum):
@@ -94,10 +100,6 @@ class ScalarUDFExportable(Protocol):
94
100
def __datafusion_scalar_udf__(self) -> object: ... # noqa: D105
95
101
96
102
97
-class _PyCapsule(Protocol):
98
- """Lightweight typing proxy for CPython ``PyCapsule`` objects."""
99
-
103
def _is_pycapsule(value: object) -> TypeGuard[_PyCapsule]:
104
"""Return ``True`` when ``value`` is a CPython ``PyCapsule``."""
105
0 commit comments