Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
jhamman committed Sep 21, 2024
commit 09aa1234f0a1465a1569ebcd78fe3d442d8c74a2
2 changes: 1 addition & 1 deletion src/zarr/abc/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

if TYPE_CHECKING:
from collections.abc import Awaitable, Callable, Iterable
from typing import Self

import numpy as np
from typing_extensions import Self

from zarr.abc.store import ByteGetter, ByteSetter
from zarr.core.array_spec import ArraySpec
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/abc/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.common import JSON

Expand Down
4 changes: 1 addition & 3 deletions src/zarr/abc/store.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from abc import ABC, abstractmethod
from asyncio import gather
from collections.abc import AsyncGenerator, Iterable
from typing import Any, NamedTuple, Protocol, runtime_checkable

from typing_extensions import Self
from typing import Any, NamedTuple, Protocol, Self, runtime_checkable

from zarr.core.buffer import Buffer, BufferPrototype
from zarr.core.common import AccessModeLiteral, BytesLike
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/blosc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.array_spec import ArraySpec
from zarr.core.buffer import Buffer
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.array_spec import ArraySpec

Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/crc32c_.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.array_spec import ArraySpec
from zarr.core.buffer import Buffer
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/gzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.array_spec import ArraySpec
from zarr.core.buffer import Buffer
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

if TYPE_CHECKING:
from collections.abc import Iterable, Iterator
from typing import Self

import numpy as np
from typing_extensions import Self

from zarr.abc.store import ByteGetter, ByteSetter
from zarr.core.array_spec import ArraySpec
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/codecs/sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@

if TYPE_CHECKING:
from collections.abc import Awaitable, Callable, Iterator

from typing_extensions import Self
from typing import Self

from zarr.core.common import JSON

Expand Down
4 changes: 1 addition & 3 deletions src/zarr/codecs/transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing import Any

from typing_extensions import Self
from typing import Any, Self

from zarr.core.buffer import NDBuffer
from zarr.core.chunk_grids import ChunkGrid
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/codecs/zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from zarr.registry import register_codec

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from zarr.core.array_spec import ArraySpec
from zarr.core.buffer import Buffer
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/buffer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

if TYPE_CHECKING:
from collections.abc import Iterable, Sequence

from typing_extensions import Self
from typing import Self

from zarr.codecs.bytes import Endian
from zarr.core.common import BytesLike, ChunkCoords
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/buffer/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

if TYPE_CHECKING:
from collections.abc import Callable, Iterable

from typing_extensions import Self
from typing import Self

from zarr.core.buffer.core import ArrayLike, NDArrayLike
from zarr.core.common import BytesLike
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/buffer/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

if TYPE_CHECKING:
from collections.abc import Iterable

from typing_extensions import Self
from typing import Self

from zarr.core.common import BytesLike

Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/chunk_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

if TYPE_CHECKING:
from collections.abc import Iterator

from typing_extensions import Self
from typing import Self


def _guess_chunks(
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/metadata/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Any, Literal
from typing import Any, Literal, Self

import numpy as np
from typing_extensions import Self

from zarr.core.array_spec import ArraySpec
from zarr.core.buffer import Buffer, BufferPrototype
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/core/metadata/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Any, Literal
from typing import Any, Literal, Self

import numpy.typing as npt
from typing_extensions import Self

from zarr.core.buffer import Buffer, BufferPrototype
from zarr.core.common import JSON, ChunkCoords
Expand Down
3 changes: 2 additions & 1 deletion src/zarr/core/metadata/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
from typing import TYPE_CHECKING, cast, overload

if TYPE_CHECKING:
from typing import Self

import numpy.typing as npt
from typing_extensions import Self

from zarr.core.buffer import Buffer, BufferPrototype
from zarr.core.chunk_grids import ChunkGrid
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def sync(

finished, unfinished = wait([future], return_when=asyncio.ALL_COMPLETED, timeout=timeout)
if len(unfinished) > 0:
raise asyncio.TimeoutError(f"Coroutine {coro} failed to finish in within {timeout}s")
raise TimeoutError(f"Coroutine {coro} failed to finish in within {timeout}s")
assert len(finished) == 1
return_result = next(iter(finished)).result()

Expand Down
3 changes: 1 addition & 2 deletions src/zarr/testing/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

if TYPE_CHECKING:
from collections.abc import Iterable

from typing_extensions import Self
from typing import Self


__all__ = [
Expand Down