diff --git a/src/cooler/_reduce.py b/src/cooler/_reduce.py index be7ce3b..195fa7a 100644 --- a/src/cooler/_reduce.py +++ b/src/cooler/_reduce.py @@ -4,7 +4,8 @@ import warnings from bisect import bisect_right from collections import OrderedDict, defaultdict -from typing import Any, Iterator, Literal +from collections.abc import Iterator +from typing import Any, Literal import h5py import multiprocess as mp diff --git a/src/cooler/_typing.py b/src/cooler/_typing.py index be36e25..ad1e2e2 100644 --- a/src/cooler/_typing.py +++ b/src/cooler/_typing.py @@ -1,6 +1,7 @@ from __future__ import annotations -from typing import Callable, Dict, Iterable, Optional, Tuple, TypeVar, Union +from collections.abc import Iterable +from typing import Callable, Dict, Optional, Tuple, TypeVar, Union import numpy as np import pandas as pd diff --git a/src/cooler/core/_rangequery.py b/src/cooler/core/_rangequery.py index fce8198..0065b92 100644 --- a/src/cooler/core/_rangequery.py +++ b/src/cooler/core/_rangequery.py @@ -1,6 +1,7 @@ from __future__ import annotations -from typing import Any, Callable, Iterator +from collections.abc import Iterator +from typing import Any, Callable import h5py import numpy as np diff --git a/src/cooler/create/_create.py b/src/cooler/create/_create.py index 3dd081a..6de4013 100644 --- a/src/cooler/create/_create.py +++ b/src/cooler/create/_create.py @@ -5,8 +5,9 @@ import posixpath import tempfile import warnings +from collections.abc import Iterable from datetime import datetime -from typing import Any, Iterable +from typing import Any import h5py import numpy as np diff --git a/src/cooler/create/_ingest.py b/src/cooler/create/_ingest.py index 0236b3f..8124617 100644 --- a/src/cooler/create/_ingest.py +++ b/src/cooler/create/_ingest.py @@ -12,8 +12,9 @@ import warnings from bisect import bisect_left from collections import Counter, OrderedDict +from collections.abc import Iterator from functools import partial -from typing import Any, Callable, Iterator +from typing import Any, Callable import h5py import numpy as np diff --git a/src/cooler/parallel.py b/src/cooler/parallel.py index abdd707..9f6c9bb 100644 --- a/src/cooler/parallel.py +++ b/src/cooler/parallel.py @@ -5,8 +5,9 @@ """ from __future__ import annotations +from collections.abc import Iterable, Iterator, Sequence from functools import partial, reduce -from typing import Any, Callable, Iterable, Iterator, Sequence +from typing import Any, Callable from multiprocess import Lock diff --git a/src/cooler/util.py b/src/cooler/util.py index 860ee58..d25b65e 100644 --- a/src/cooler/util.py +++ b/src/cooler/util.py @@ -3,8 +3,9 @@ import os import re from collections import OrderedDict, defaultdict +from collections.abc import Generator, Iterable, Iterator from contextlib import contextmanager -from typing import IO, Any, Generator, Iterable, Iterator +from typing import IO, Any import h5py import numpy as np