Skip to content

Commit 3922eff

Browse files
committed
Add PathType
1 parent 99c3b23 commit 3922eff

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

bio2zarr/csi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
import numpy as np
1010

11+
from bio2zarr.typing import PathType
1112
from bio2zarr.utils import (
1213
get_file_offset,
1314
open_gzip,
1415
read_bytes_as_tuple,
1516
read_bytes_as_value,
1617
)
17-
from sgkit.typing import PathType
1818

1919
CSI_EXTENSION = ".csi"
2020

bio2zarr/tbi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
import numpy as np
1010

11+
from bio2zarr.typing import PathType
1112
from bio2zarr.utils import (
1213
get_file_offset,
1314
open_gzip,
1415
read_bytes_as_tuple,
1516
read_bytes_as_value,
1617
)
17-
from sgkit.typing import PathType
1818

1919
TABIX_EXTENSION = ".tbi"
2020
TABIX_LINEAR_INDEX_INTERVAL_SIZE = 1 << 14 # 16kb interval size

bio2zarr/typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from pathlib import Path
2+
from typing import Union
3+
4+
PathType = Union[str, Path]

bio2zarr/vcf_partition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
from bio2zarr.csi import CSI_EXTENSION, read_csi
99
from bio2zarr.tbi import TABIX_EXTENSION, read_tabix
10+
from bio2zarr.typing import PathType
1011
from bio2zarr.utils import ceildiv, get_file_length
11-
from sgkit.typing import PathType
1212

1313

1414
def region_string(contig: str, start: int, end: Optional[int] = None) -> str:

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from cyvcf2 import VCF, Variant
88

9-
from sgkit.typing import PathType
9+
from bio2zarr.typing import PathType
1010

1111

1212
def path_for_test(shared_datadir: Path, file: str, is_path: bool = True) -> PathType:

0 commit comments

Comments
 (0)