Unverified Commit 649ef60c authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python] Fix typehints in Sequence API (#5465)

parent ccc1f89f
......@@ -1308,15 +1308,19 @@ class Dataset:
assert sample_cnt == actual_sample_cnt.value
return indices
def _init_from_ref_dataset(self, total_nrow: int, ref_dataset: 'Dataset') -> 'Dataset':
def _init_from_ref_dataset(
self,
total_nrow: int,
ref_dataset: _DatasetHandle
) -> 'Dataset':
"""Create dataset from a reference dataset.
Parameters
----------
total_nrow : int
Number of rows expected to add to dataset.
ref_dataset : Dataset
Reference dataset to extract meta from.
ref_dataset : object
Handle of reference dataset to extract metadata from.
Returns
-------
......@@ -1658,7 +1662,7 @@ class Dataset:
def __init_from_seqs(
self,
seqs: List[Sequence],
ref_dataset: Optional["Dataset"] = None
ref_dataset: Optional[_DatasetHandle] = None
) -> "Dataset":
"""
Initialize data from list of Sequence objects.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment