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 618e5b3 commit 97f2255Copy full SHA for 97f2255
src/duckdb_py/typing/pytype.cpp
@@ -26,10 +26,10 @@ bool PyUnionType::check_(const py::handle &object) {
26
if (types_loaded && py::isinstance(object, import_cache.types.UnionType())) {
27
return true;
28
}
29
- // for all py3: isinstance(typing.get_origin(object), typing.Union)
+ // for all py3: typing.get_origin(object) is typing.Union
30
auto get_origin_func = import_cache.typing.get_origin();
31
auto origin = get_origin_func(object);
32
- if (py::isinstance(origin, import_cache.typing.Union())) {
+ if (origin.is(import_cache.typing.Union())) {
33
34
35
return false;
0 commit comments