From ff38a208630cba2ffdb92f08cf1ce3258dc14a8c Mon Sep 17 00:00:00 2001 From: Branden Chan <33759007+brandenchan@users.noreply.github.com> Date: Mon, 15 Aug 2022 12:37:28 +0200 Subject: [PATCH] docs: update File Classifier Docstring (#3018) * Update docstring * Trigger pre-commit hook * Trigger pre-commit hook * Incorporate reviewer feedback * Incorporate reviewer feedback --- docs/_src/api/api/file_classifier.md | 9 +++------ haystack/nodes/file_classifier/file_type.py | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/_src/api/api/file_classifier.md b/docs/_src/api/api/file_classifier.md index 32fbdf28d..8ffe4963b 100644 --- a/docs/_src/api/api/file_classifier.md +++ b/docs/_src/api/api/file_classifier.md @@ -24,12 +24,9 @@ Node that sends out files on a different output edge depending on their extensio **Arguments**: -- `supported_types`: the file types that this node can distinguish. -Note that it's limited to a maximum of 10 outgoing edges, which -correspond each to a file extension. Such extension are, by default -`txt`, `pdf`, `md`, `docx`, `html`. Lists containing more than 10 -elements will not be allowed. Lists with duplicate elements will -also be rejected. +- `supported_types`: The file types that this node can distinguish between. +The default values are: `txt`, `pdf`, `md`, `docx`, and `html`. +Lists with duplicate elements are not allowed. diff --git a/haystack/nodes/file_classifier/file_type.py b/haystack/nodes/file_classifier/file_type.py index c19114958..cf720e6f7 100644 --- a/haystack/nodes/file_classifier/file_type.py +++ b/haystack/nodes/file_classifier/file_type.py @@ -33,12 +33,9 @@ class FileTypeClassifier(BaseComponent): """ Node that sends out files on a different output edge depending on their extension. - :param supported_types: the file types that this node can distinguish. - Note that it's limited to a maximum of 10 outgoing edges, which - correspond each to a file extension. Such extension are, by default - `txt`, `pdf`, `md`, `docx`, `html`. Lists containing more than 10 - elements will not be allowed. Lists with duplicate elements will - also be rejected. + :param supported_types: The file types that this node can distinguish between. + The default values are: `txt`, `pdf`, `md`, `docx`, and `html`. + Lists with duplicate elements are not allowed. """ if len(set(supported_types)) != len(supported_types): duplicates = supported_types