From d37e414d5baaf6ca87763b3987c43a72d2dac24c Mon Sep 17 00:00:00 2001 From: Aki Ariga Date: Tue, 10 Dec 2024 15:39:54 -0800 Subject: [PATCH] Address deprecation of typing.Hashable --- rectools/metrics/intersection.py | 3 ++- tests/tools/test_ann.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rectools/metrics/intersection.py b/rectools/metrics/intersection.py index 369917f0..60cdaae4 100644 --- a/rectools/metrics/intersection.py +++ b/rectools/metrics/intersection.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict, Hashable, Optional, Union +from collections.abc import Hashable +from typing import Dict, Optional, Union import attr import numpy as np diff --git a/tests/tools/test_ann.py b/tests/tools/test_ann.py index 48fd27fb..90829ce4 100644 --- a/tests/tools/test_ann.py +++ b/tests/tools/test_ann.py @@ -14,7 +14,8 @@ import pickle import sys -from typing import Callable, Dict, Hashable, List, Union +from collections.abc import Hashable +from typing import Callable, Dict, List, Union import numpy as np import pytest