Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _create_generator(self, *args, **kwargs) -> Union[GraphBatchDistanceConvert, GraphBatchGenerator]:
if hasattr(self.graph_converter, 'bond_converter'):
kwargs.update({'distance_converter': self.graph_converter.bond_converter})
return GraphBatchDistanceConvert(*args, **kwargs)
else:
return GraphBatchGenerator(*args, **kwargs)
def _create_generator(self, *args, **kwargs) -> Union[GraphBatchDistanceConvert, GraphBatchGenerator]:
if hasattr(self.graph_converter, 'bond_converter'):
kwargs.update({'distance_converter': self.graph_converter.bond_converter})
return GraphBatchDistanceConvert(*args, **kwargs)
else:
return GraphBatchGenerator(*args, **kwargs)