chore: update linter configuration for compatibility with latest ruff release (#9528)

* Fix linting

* Fix linting

* Update error suppression

* Update pre commit

* Update pyproject.toml
This commit is contained in:
Amna Mubashar 2025-06-18 09:53:19 +02:00 committed by GitHub
parent 6198f0cba9
commit 67a8f1249b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 6 deletions

View File

@ -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 ]

View File

@ -12,7 +12,7 @@ SocketsDict = Dict[str, Union[InputSocket, OutputSocket]]
SocketsIOType = Union[Type[InputSocket], Type[OutputSocket]]
class Sockets:
class Sockets: # noqa: PLW1641
"""
Represents the inputs or outputs of a `Component`.

View File

@ -71,7 +71,7 @@ class ComponentPriority(IntEnum):
BLOCKED = 5
class PipelineBase:
class PipelineBase: # noqa: PLW1641
"""
Components orchestration engine.

View File

@ -43,7 +43,7 @@ class _BackwardCompatible(type):
@dataclass
class Document(metaclass=_BackwardCompatible):
class Document(metaclass=_BackwardCompatible): # noqa: PLW1641
"""
Base data class containing some data to be queried.

View File

@ -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,8 @@ 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", # import-outside-top-level,
]
[tool.ruff.lint.mccabe]