Skip to content

Commit a7755ca

Browse files
committed
Fix typing
1 parent f9c32cc commit a7755ca

File tree

1 file changed

+5
-4
lines changed
  • yt/frontends/rockstar

1 file changed

+5
-4
lines changed

yt/frontends/rockstar/io.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from collections.abc import Sequence
23

34
import numpy as np
45

@@ -9,7 +10,7 @@
910

1011

1112
def _can_load_with_format(
12-
filename: str, header_fmt: tuple[str, int, str], halo_format: np.dtype
13+
filename: str, header_fmt: Sequence[tuple[str, int, str]], halo_format: np.dtype
1314
) -> bool:
1415
with open(filename, "rb") as f:
1516
header = fpu.read_cattrs(f, header_fmt, "=")
@@ -40,9 +41,9 @@ def __init__(self, *args, **kwargs):
4041
@staticmethod
4142
def detect_rockstar_format(
4243
filename: str,
43-
guess: int | str,
44-
) -> bool:
45-
revisions = list(halo_dts.keys())
44+
guess: int,
45+
) -> np.dtype:
46+
revisions: list[int] = list(halo_dts.keys())
4647
if guess in revisions:
4748
revisions.pop(revisions.index(guess))
4849
revisions = [guess] + revisions

0 commit comments

Comments
 (0)