Skip to content

Commit bc5b2ca

Browse files
Fix for FutureWarning: functools.partial ... (#1076)
chore: silence FutureWarning of partial becoming method descriptor.
1 parent cdf3435 commit bc5b2ca

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/spatialdata/_core/query/relational_query.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import warnings
33
from collections import defaultdict
44
from dataclasses import dataclass
5-
from enum import Enum
5+
from enum import Enum, member
66
from functools import partial, singledispatch
77
from typing import Any, Literal
88

@@ -528,11 +528,11 @@ def _match_rows(
528528
class JoinTypes(Enum):
529529
"""Available join types for matching elements to tables and vice versa."""
530530

531-
left = partial(_left_join_spatialelement_table)
532-
left_exclusive = partial(_left_exclusive_join_spatialelement_table)
533-
inner = partial(_inner_join_spatialelement_table)
534-
right = partial(_right_join_spatialelement_table)
535-
right_exclusive = partial(_right_exclusive_join_spatialelement_table)
531+
left = member(partial(_left_join_spatialelement_table))
532+
left_exclusive = member(partial(_left_exclusive_join_spatialelement_table))
533+
inner = member(partial(_inner_join_spatialelement_table))
534+
right = member(partial(_right_join_spatialelement_table))
535+
right_exclusive = member(partial(_right_exclusive_join_spatialelement_table))
536536

537537
def __call__(self, *args: Any) -> tuple[dict[str, Any], AnnData]:
538538
return self.value(*args)

0 commit comments

Comments
 (0)