Skip to content

Commit a488a5c

Browse files
committed
Try not. Do. Or do not. there is no try
1 parent 6045c66 commit a488a5c

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

molpipeline/mol2any/mol2chemprop.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,18 @@
22

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

5-
import warnings
65
from collections.abc import Iterable
76
from typing import Any, Self
87

98
import numpy as np
109
import numpy.typing as npt
11-
12-
try:
13-
from chemprop.data import MoleculeDatapoint, MoleculeDataset
14-
from chemprop.featurizers.base import GraphFeaturizer, VectorFeaturizer
15-
16-
from molpipeline.estimators.chemprop.featurizer_wrapper.graph_wrapper import (
17-
SimpleMoleculeMolGraphFeaturizer,
18-
)
19-
except ImportError:
20-
warnings.warn(
21-
"chemprop not installed. MolToChemprop will not work.",
22-
ImportWarning,
23-
stacklevel=2,
24-
)
25-
10+
from chemprop.data import MoleculeDatapoint, MoleculeDataset
11+
from chemprop.featurizers.base import GraphFeaturizer, VectorFeaturizer
2612

2713
from molpipeline.abstract_pipeline_elements.core import MolToAnyPipelineElement
14+
from molpipeline.estimators.chemprop.featurizer_wrapper.graph_wrapper import (
15+
SimpleMoleculeMolGraphFeaturizer,
16+
)
2817
from molpipeline.utils.molpipeline_types import RDKitMol
2918

3019

0 commit comments

Comments
 (0)