diff --git a/chebai/preprocessing/datasets/base.py b/chebai/preprocessing/datasets/base.py index 5cd210be..4cf6edf0 100644 --- a/chebai/preprocessing/datasets/base.py +++ b/chebai/preprocessing/datasets/base.py @@ -335,8 +335,9 @@ def _load_data_from_file(self, path: str) -> List[Dict[str, Any]]: val for val in data if val["features"] is not None - and self.n_token_limit is None - or len(val["features"]) <= self.n_token_limit + and ( + self.n_token_limit is None or len(val["features"]) <= self.n_token_limit + ) ] return data