From 44f43ef40325d6a31c40b68e0ddcbc9941b40762 Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Tue, 17 Jun 2025 22:38:11 +0200 Subject: [PATCH 1/5] Fix linting --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 81b5a6df73..998d2f2ae3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ dependencies = [ "pandas", # AzureOCRDocumentConverter, CSVDocumentCleaner, CSVDocumentSplitter, # EvaluationRunResult, XLSXToDocument, and pipeline tests - "transformers[torch,sentencepiece]>=4.51.1,<4.52", # ExtractiveReader, TransformersSimilarityRanker, LocalWhisperTranscriber, HFGenerators... + "transformers[torch, sentencepiece]>=4.51.1,<4.52", # ExtractiveReader, TransformersSimilarityRanker, LocalWhisperTranscriber, HFGenerators... "huggingface_hub>=0.27.0", # Hugging Face API Generators and Embedders "sentence-transformers>=4.1.0", # Sentence Transformers Embedders, Rankers, and SASEvaluator "langdetect", # TextLanguageRouter and DocumentLanguageClassifier @@ -333,7 +333,9 @@ ignore = [ "SIM118", # in-dict-keys # we re-export symbols for correct type checking # https://typing.python.org/en/latest/spec/distributing.html#import-conventions - "PLC0414", # useless-import-alias + "PLC0414", # useless-import-alias, + "PLC0415", # useless-import-alias, + "PLW1641", # use-f-string ] [tool.ruff.lint.mccabe] From 650b764251fb629bed917f9fe510b0caaf6975c6 Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Tue, 17 Jun 2025 23:02:03 +0200 Subject: [PATCH 2/5] Fix linting --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 998d2f2ae3..1372b3d248 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -334,8 +334,8 @@ ignore = [ # we re-export symbols for correct type checking # https://typing.python.org/en/latest/spec/distributing.html#import-conventions "PLC0414", # useless-import-alias, - "PLC0415", # useless-import-alias, - "PLW1641", # use-f-string + "PLC0415", # import-outside-top-level, + "PLW1641", # eq-without-hash ] [tool.ruff.lint.mccabe] From a45137f3dd30e586cfce884f3666dcec917bef6a Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Wed, 18 Jun 2025 09:38:32 +0200 Subject: [PATCH 3/5] Update error suppression --- haystack/core/component/sockets.py | 2 +- haystack/core/pipeline/base.py | 2 +- haystack/dataclasses/document.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/haystack/core/component/sockets.py b/haystack/core/component/sockets.py index da516e9a3e..8abeb8b25d 100644 --- a/haystack/core/component/sockets.py +++ b/haystack/core/component/sockets.py @@ -12,7 +12,7 @@ SocketsIOType = Union[Type[InputSocket], Type[OutputSocket]] -class Sockets: +class Sockets: # noqa: PLW1641 """ Represents the inputs or outputs of a `Component`. diff --git a/haystack/core/pipeline/base.py b/haystack/core/pipeline/base.py index 078eb8513e..2db9cdb1ee 100644 --- a/haystack/core/pipeline/base.py +++ b/haystack/core/pipeline/base.py @@ -71,7 +71,7 @@ class ComponentPriority(IntEnum): BLOCKED = 5 -class PipelineBase: +class PipelineBase: # noqa: PLW1641 """ Components orchestration engine. diff --git a/haystack/dataclasses/document.py b/haystack/dataclasses/document.py index 6794e002b9..55bd74e113 100644 --- a/haystack/dataclasses/document.py +++ b/haystack/dataclasses/document.py @@ -43,7 +43,7 @@ def __call__(cls, *args, **kwargs): @dataclass -class Document(metaclass=_BackwardCompatible): +class Document(metaclass=_BackwardCompatible): # noqa: PLW1641 """ Base data class containing some data to be queried. From d0ae67493f34457b5a8a1fc43246deda18e80abe Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Wed, 18 Jun 2025 09:40:47 +0200 Subject: [PATCH 4/5] Update pre commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a4a9a72675..429fd2d4e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: args: [--markdown-linebreak-ext=md] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.12 + rev: v0.12.0 hooks: - id: ruff-check args: [ --fix ] From a6cf95345050ad070f948ef32bc22780e94c8751 Mon Sep 17 00:00:00 2001 From: Amna Mubashar Date: Wed, 18 Jun 2025 09:43:28 +0200 Subject: [PATCH 5/5] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1372b3d248..4ba6fd5c7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -335,7 +335,6 @@ ignore = [ # https://typing.python.org/en/latest/spec/distributing.html#import-conventions "PLC0414", # useless-import-alias, "PLC0415", # import-outside-top-level, - "PLW1641", # eq-without-hash ] [tool.ruff.lint.mccabe]