Skip to content

Commit 59b118d

Browse files
Fix new ruff/flake8-type-checking TCH003 error (#2154)
TCH003 Move standard library import into a type-checking block
1 parent e8800b0 commit 59b118d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/v3/test_buffer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
import types
3+
from typing import TYPE_CHECKING
44

55
import numpy as np
66
import pytest
@@ -23,6 +23,9 @@
2323
)
2424
from zarr.testing.utils import gpu_test
2525

26+
if TYPE_CHECKING:
27+
import types
28+
2629
try:
2730
import cupy as cp
2831
except ImportError:

0 commit comments

Comments
 (0)