-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(datasets): lazily load datasets in init files (biosequence)
Signed-off-by: Deepyaman Datta <[email protected]>
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
"""``AbstractDataSet`` implementation to read/write from/to a sequence file.""" | ||
from typing import Any | ||
|
||
__all__ = ["BioSequenceDataSet"] | ||
import lazy_loader as lazy | ||
|
||
from contextlib import suppress | ||
# https://github.com/pylint-dev/pylint/issues/4300#issuecomment-1043601901 | ||
BioSequenceDataSet: Any | ||
|
||
with suppress(ImportError): | ||
from .biosequence_dataset import BioSequenceDataSet | ||
__getattr__, __dir__, __all__ = lazy.attach( | ||
__name__, submod_attrs={"biosequence_dataset": ["BiosequenceDataSet"]} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters