diff --git a/src/distilabel/distiset.py b/src/distilabel/distiset.py index 8e52c667d3..a33675067c 100644 --- a/src/distilabel/distiset.py +++ b/src/distilabel/distiset.py @@ -476,9 +476,9 @@ def load_from_disk( ) dest_distiset_path = distiset_path - assert fs.isdir( - original_distiset_path - ), "`distiset_path` must be a `PathLike` object pointing to a folder or a URI of a remote filesystem." + assert fs.isdir(original_distiset_path), ( + "`distiset_path` must be a `PathLike` object pointing to a folder or a URI of a remote filesystem." + ) has_config = False has_artifacts = False diff --git a/src/distilabel/steps/base.py b/src/distilabel/steps/base.py index b98c0e8275..3aed2925b3 100644 --- a/src/distilabel/steps/base.py +++ b/src/distilabel/steps/base.py @@ -99,7 +99,7 @@ def _infer_step_name( base_name = "_".join(parts[:-1]) while name in step_names: idx = int(name.split("_")[-1]) - name = f"{base_name}_{idx+1}" + name = f"{base_name}_{idx + 1}" return name diff --git a/src/distilabel/utils/mkdocs/components_gallery.py b/src/distilabel/utils/mkdocs/components_gallery.py index 621f4b61dc..daad0385c4 100644 --- a/src/distilabel/utils/mkdocs/components_gallery.py +++ b/src/distilabel/utils/mkdocs/components_gallery.py @@ -283,9 +283,9 @@ def _generate_steps_pages(self, src_dir: Path, steps: list) -> List[str]: docstring["icon"] = _STEPS_CATEGORY_TO_ICON.get(first_category, "") if docstring["icon"]: - assert ( - docstring["icon"] in _STEPS_CATEGORY_TO_ICON.values() - ), f"Icon {docstring['icon']} not found in _STEPS_CATEGORY_TO_ICON" + assert docstring["icon"] in _STEPS_CATEGORY_TO_ICON.values(), ( + f"Icon {docstring['icon']} not found in _STEPS_CATEGORY_TO_ICON" + ) name = step["name"] @@ -351,9 +351,9 @@ def _generate_tasks_pages(self, src_dir: Path, tasks: list) -> List[str]: first_category = docstring["categories"][0] docstring["icon"] = _STEPS_CATEGORY_TO_ICON.get(first_category, "") if docstring["icon"]: - assert ( - docstring["icon"] in _STEPS_CATEGORY_TO_ICON.values() - ), f"Icon {docstring['icon']} not found in _STEPS_CATEGORY_TO_ICON" + assert docstring["icon"] in _STEPS_CATEGORY_TO_ICON.values(), ( + f"Icon {docstring['icon']} not found in _STEPS_CATEGORY_TO_ICON" + ) name = task["name"]