Skip to content

Commit 21e8674

Browse files
author
Benjamin Moody
committed
contained_combined_ranges: fix type annotation.
This function requires as input a Sequence of signal names, not merely a Collection. (There's no particular reason this function *couldn't* be written to accept any Collection or even any Iterable, but at present it requires the argument to be something that implements both __len__ and __getitem__.)
1 parent 5c00559 commit 21e8674

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/_header.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import datetime
2-
from typing import Collection, List, Tuple
2+
from typing import List, Sequence, Tuple
33

44
import numpy as np
55
import pandas as pd
@@ -920,7 +920,7 @@ def contained_ranges(self, sig_name: str) -> List[Tuple[int, int]]:
920920

921921
def contained_combined_ranges(
922922
self,
923-
sig_names: Collection[str],
923+
sig_names: Sequence[str],
924924
) -> List[Tuple[int, int]]:
925925
"""
926926
Given a collection of signal name, return the sample ranges that

0 commit comments

Comments
 (0)