Skip to content

Commit 79c955d

Browse files
committed
type check
1 parent ea2de60 commit 79c955d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

molpipeline/mol2any/mol2chemprop.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@
22

33
# pylint: disable=too-many-arguments
44

5-
from collections.abc import Iterable
6-
from typing import Any, Self
5+
from __future__ import annotations
6+
7+
from typing import TYPE_CHECKING, Any, Self
78

89
import numpy as np
910
import numpy.typing as npt
1011
from chemprop.data import MoleculeDatapoint, MoleculeDataset
11-
from chemprop.featurizers.base import GraphFeaturizer, VectorFeaturizer
1212

1313
from molpipeline.abstract_pipeline_elements.core import MolToAnyPipelineElement
1414
from molpipeline.estimators.chemprop.featurizer_wrapper.graph_wrapper import (
1515
SimpleMoleculeMolGraphFeaturizer,
1616
)
17-
from molpipeline.utils.molpipeline_types import RDKitMol
17+
18+
if TYPE_CHECKING:
19+
from collections.abc import Iterable
20+
21+
from chemprop.featurizers.base import GraphFeaturizer, VectorFeaturizer
22+
23+
from molpipeline.utils.molpipeline_types import RDKitMol
1824

1925

2026
class MolToChemprop(MolToAnyPipelineElement):

0 commit comments

Comments
 (0)