From e97b26e9a4015cfdc0a4b771067784974139e640 Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Mon, 14 Nov 2022 10:37:37 +0100 Subject: [PATCH 1/5] chore: add ruff and fix most of the errors Signed-off-by: Sami Jaghouar --- docarray/array/__init__.py | 2 ++ docarray/array/mixins/__init__.py | 2 ++ docarray/document/__init__.py | 2 ++ docarray/document/mixins/__init__.py | 2 ++ docarray/document/mixins/proto.py | 4 ++-- docarray/proto/__init__.py | 9 ++++++++- docarray/typing/__init__.py | 10 +++------- docarray/typing/ndarray.py | 1 - docarray/typing/tensor/__init__.py | 4 +++- docarray/typing/tensor/tensor.py | 11 +++++++---- docarray/typing/url/__init__.py | 2 ++ poetry.lock | 11 ++++++++++- pyproject.toml | 5 +++++ 13 files changed, 48 insertions(+), 17 deletions(-) diff --git a/docarray/array/__init__.py b/docarray/array/__init__.py index bf17ef82664..bd3461f4826 100644 --- a/docarray/array/__init__.py +++ b/docarray/array/__init__.py @@ -1 +1,3 @@ from docarray.array.documentarray import DocumentArray + +__all__ = ['DocumentArray'] diff --git a/docarray/array/mixins/__init__.py b/docarray/array/mixins/__init__.py index cd9c061a6b1..107ea40271d 100644 --- a/docarray/array/mixins/__init__.py +++ b/docarray/array/mixins/__init__.py @@ -1 +1,3 @@ from docarray.array.mixins.proto import ProtoArrayMixin + +__all__ = ['ProtoArrayMixin'] diff --git a/docarray/document/__init__.py b/docarray/document/__init__.py index 7435967f70f..56723b43937 100644 --- a/docarray/document/__init__.py +++ b/docarray/document/__init__.py @@ -1,2 +1,4 @@ from docarray.document.any_document import AnyDocument from docarray.document.document import BaseDocument + +__all__ =['AnyDocument', 'BaseDocument'] \ No newline at end of file diff --git a/docarray/document/mixins/__init__.py b/docarray/document/mixins/__init__.py index c5397f7f9e1..1b9744fe785 100644 --- a/docarray/document/mixins/__init__.py +++ b/docarray/document/mixins/__init__.py @@ -1 +1,3 @@ from docarray.document.mixins.proto import ProtoMixin + +__all__ = ['ProtoMixin'] diff --git a/docarray/document/mixins/proto.py b/docarray/document/mixins/proto.py index 6fc38fbe080..cd2d8820fd8 100644 --- a/docarray/document/mixins/proto.py +++ b/docarray/document/mixins/proto.py @@ -1,6 +1,6 @@ -from typing import TYPE_CHECKING, Any, Dict, Type +from typing import Any, Dict, Type -from docarray.proto import DocumentProto, NdArrayProto, NodeProto +from docarray.proto import DocumentProto, NodeProto from docarray.typing import Tensor from ..abstract_document import AbstractDocument diff --git a/docarray/proto/__init__.py b/docarray/proto/__init__.py index ca5d6928a9f..f3fa211946c 100644 --- a/docarray/proto/__init__.py +++ b/docarray/proto/__init__.py @@ -1 +1,8 @@ -from docarray.proto.pb2.docarray_pb2 import DocumentArrayProto, DocumentProto, NdArrayProto, NodeProto +from docarray.proto.pb2.docarray_pb2 import ( + DocumentArrayProto, + DocumentProto, + NdArrayProto, + NodeProto, +) + +__all__ = ['DocumentArrayProto', 'DocumentProto', 'NdArrayProto', 'NodeProto'] diff --git a/docarray/typing/__init__.py b/docarray/typing/__init__.py index 2d283eb0eda..326e4113bfc 100644 --- a/docarray/typing/__init__.py +++ b/docarray/typing/__init__.py @@ -1,10 +1,6 @@ -from typing import TypeVar - from docarray.document.base_node import BaseNode -from .ndarray import Embedding, Tensor -from .url import ImageUrl - -T = TypeVar('T') +from docarray.typing.ndarray import Embedding, Tensor +from docarray.typing.url import ImageUrl -__all__ = ['Tensor', 'Embedding', 'BaseNode'] +__all__ = ['Tensor', 'Embedding', 'BaseNode', 'ImageUrl'] diff --git a/docarray/typing/ndarray.py b/docarray/typing/ndarray.py index 841bb541830..196d52955aa 100644 --- a/docarray/typing/ndarray.py +++ b/docarray/typing/ndarray.py @@ -1,4 +1,3 @@ -import numpy as np from .tensor import Tensor Embedding = Tensor diff --git a/docarray/typing/tensor/__init__.py b/docarray/typing/tensor/__init__.py index aa666c11ebc..748c5a3fc21 100644 --- a/docarray/typing/tensor/__init__.py +++ b/docarray/typing/tensor/__init__.py @@ -1 +1,3 @@ -from .tensor import Tensor \ No newline at end of file +from docarray.typing.tensor.tensor import Tensor + +__all__ = ['Tensor'] \ No newline at end of file diff --git a/docarray/typing/tensor/tensor.py b/docarray/typing/tensor/tensor.py index 179eaca3596..b9ba90c5fcc 100644 --- a/docarray/typing/tensor/tensor.py +++ b/docarray/typing/tensor/tensor.py @@ -1,12 +1,13 @@ from typing import Union, TypeVar, Any, TYPE_CHECKING, Type, cast import numpy as np + if TYPE_CHECKING: from pydantic.fields import ModelField - from pydantic import BaseConfig, PydanticValueError + from pydantic import BaseConfig from docarray.document.base_node import BaseNode -from docarray.proto import DocumentProto, NdArrayProto, NodeProto +from docarray.proto import NdArrayProto, NodeProto T = TypeVar('T', bound='Tensor') @@ -20,7 +21,9 @@ def __get_validators__(cls): yield cls.validate @classmethod - def validate(cls: Type[T], value: Union[T, Any], field: 'ModelField', config: 'BaseConfig') -> T: + def validate( + cls: Type[T], value: Union[T, Any], field: 'ModelField', config: 'BaseConfig' + ) -> T: if isinstance(value, np.ndarray): return cls.from_ndarray(value) elif isinstance(value, Tensor): @@ -69,4 +72,4 @@ def flush_ndarray(pb_msg: 'NdArrayProto', value: 'Tensor'): pb_msg.dense.buffer = value.tobytes() pb_msg.dense.ClearField('shape') pb_msg.dense.shape.extend(list(value.shape)) - pb_msg.dense.dtype = value.dtype.str \ No newline at end of file + pb_msg.dense.dtype = value.dtype.str diff --git a/docarray/typing/url/__init__.py b/docarray/typing/url/__init__.py index a2f2abe0dd5..75814c96fb5 100644 --- a/docarray/typing/url/__init__.py +++ b/docarray/typing/url/__init__.py @@ -1 +1,3 @@ from .image_url import ImageUrl + +__all__ = ['ImageUrl'] diff --git a/poetry.lock b/poetry.lock index 9b54387b600..d346153517e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1194,6 +1194,14 @@ urllib3 = ">=1.21.1,<1.27" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "ruff" +version = "0.0.117" +description = "An extremely fast Python linter, written in Rust." +category = "dev" +optional = false +python-versions = ">=3.7" + [[package]] name = "send2trash" version = "1.8.0" @@ -1408,7 +1416,7 @@ common = ["protobuf"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "06ce6ab9d586fba9a5c6c9402b7193baa9fdf217a96614e2b58adbdc90cde126" +content-hash = "554564c0d24e3fc9a7e17e1b3020fcc428dd6bdfc2f2725f5e98f1ea6bdc8270" [metadata.files] anyio = [] @@ -1706,6 +1714,7 @@ pyyaml = [ ] pyzmq = [] requests = [] +ruff = [] send2trash = [ {file = "Send2Trash-1.8.0-py3-none-any.whl", hash = "sha256:f20eaadfdb517eaca5ce077640cb261c7d2698385a6a0f072a4a5447fd49fa08"}, {file = "Send2Trash-1.8.0.tar.gz", hash = "sha256:d2c24762fd3759860a0aff155e45871447ea58d2be6bdd39b5c8f966a0c99c2d"}, diff --git a/pyproject.toml b/pyproject.toml index 37119351b66..33b8598b281 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ types-protobuf = "^3.20.4" black = "^22.10.0" isort = "^5.10.1" flake8 = "^5.0.4" +ruff = "^0.0.117" [build-system] requires = ["poetry-core>=1.0.0"] @@ -39,3 +40,7 @@ exclude = 'docarray/proto/pb2/*' [tool.isort] skip_glob= ['docarray/proto/pb2/*'] + +[tool.ruff] +exclude = ['docarray/proto/pb2/*'] +line-length = 88 \ No newline at end of file From 2db99581067b768ef540454cf7cfcdb2fce4a47d Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Mon, 14 Nov 2022 10:44:25 +0100 Subject: [PATCH 2/5] chore: fix all of the rest of ruff problem Signed-off-by: Sami Jaghouar --- docarray/array/mixins/proto.py | 6 ++++-- docarray/document/__init__.py | 2 +- docarray/document/any_document.py | 3 ++- docarray/document/base_node.py | 9 +++++---- docarray/document/mixins/proto.py | 15 +++++++++------ docarray/typing/tensor/__init__.py | 2 +- docarray/typing/tensor/tensor.py | 5 +++-- docarray/typing/url/any_url.py | 5 +++-- 8 files changed, 28 insertions(+), 19 deletions(-) diff --git a/docarray/array/mixins/proto.py b/docarray/array/mixins/proto.py index edaadde78f9..a38637f4e6d 100644 --- a/docarray/array/mixins/proto.py +++ b/docarray/array/mixins/proto.py @@ -17,7 +17,8 @@ def from_protobuf( def to_protobuf(self) -> 'DocumentArrayProto': """Convert DocumentArray into a Protobuf message. - :param ndarray_type: can be ``list`` or ``numpy``, if set it will force all ndarray-like object from all + :param ndarray_type: can be ``list`` or ``numpy``, + if set it will force all ndarray-like object from all Documents to ``List`` or ``numpy.ndarray``. :return: the protobuf message """ @@ -28,7 +29,8 @@ def to_protobuf(self) -> 'DocumentArrayProto': return dap def _to_nested_item_protobuf(self) -> 'NodeProto': - """Convert a DocumentArray into a nested item protobuf message. This function should be called when a DocumentArray + """Convert a DocumentArray into a nested item protobuf message. + This function should be called when a DocumentArray is nested into another Document that need to be converted into a protobuf :return: the nested item protobuf message diff --git a/docarray/document/__init__.py b/docarray/document/__init__.py index 56723b43937..eb73dccb05f 100644 --- a/docarray/document/__init__.py +++ b/docarray/document/__init__.py @@ -1,4 +1,4 @@ from docarray.document.any_document import AnyDocument from docarray.document.document import BaseDocument -__all__ =['AnyDocument', 'BaseDocument'] \ No newline at end of file +__all__ = ['AnyDocument', 'BaseDocument'] diff --git a/docarray/document/any_document.py b/docarray/document/any_document.py index 765f168f3ee..a541b8574b1 100644 --- a/docarray/document/any_document.py +++ b/docarray/document/any_document.py @@ -15,7 +15,8 @@ def __init__(self, **kwargs): @classmethod def _get_nested_document_class(cls, field: str) -> Type['BaseDocument']: """ - Accessing the nested python Class define in the schema. Could be useful for reconstruction of Document in + Accessing the nested python Class define in the schema. + Could be useful for reconstruction of Document in serialization/deserilization :param field: name of the field :return: diff --git a/docarray/document/base_node.py b/docarray/document/base_node.py index 4d6d49b2a68..507511aef56 100644 --- a/docarray/document/base_node.py +++ b/docarray/document/base_node.py @@ -5,14 +5,15 @@ class BaseNode(ABC): """ - A DocumentNode is an object than can be nested inside a Document. A Document itself is a DocumentNode as well - as prebuilt type + A DocumentNode is an object than can be nested inside a Document. + A Document itself is a DocumentNode as well as prebuilt type """ @abstractmethod def _to_nested_item_protobuf(self) -> 'NodeProto': - """Convert itself into a nested item protobuf message. This function should be called when the self - is nested into another Document that need to be converted into a protobuf + """Convert itself into a nested item protobuf message. This function should + be called when the self is nested into another Document that need to be + converted into a protobuf :return: the nested item protobuf message """ diff --git a/docarray/document/mixins/proto.py b/docarray/document/mixins/proto.py index cd2d8820fd8..dea1bc13115 100644 --- a/docarray/document/mixins/proto.py +++ b/docarray/document/mixins/proto.py @@ -11,8 +11,8 @@ class ProtoMixin(AbstractDocument, BaseNode): @classmethod def _get_nested_document_class(cls, field: str) -> Type['ProtoMixin']: """ - Accessing the nested python Class define in the schema. Could be useful for reconstruction of Document in - serialization/deserilization + Accessing the nested python Class define in the schema. Could be useful for + reconstruction of Document in serialization/deserilization :param field: name of the field :return: """ @@ -78,8 +78,10 @@ def to_protobuf(self) -> 'DocumentProto': except RecursionError as ex: if len(ex.args) >= 1: ex.args = ( - f'Field `{field}` contains cyclic reference in memory. ' - f'Could it be your Document is referring to itself?', + ( + f'Field `{field}` contains cyclic reference in memory. ' + 'Could it be your Document is referring to itself?' + ), ) raise except Exception as ex: @@ -90,8 +92,9 @@ def to_protobuf(self) -> 'DocumentProto': return DocumentProto(data=data) def _to_nested_item_protobuf(self) -> 'NodeProto': - """Convert Document into a nested item protobuf message. This function should be called when the Document - is nest into another Document that need to be converted into a protobuf + """Convert Document into a nested item protobuf message. This function should be + called when the Document is nest into another Document that need to be + converted into a protobuf :return: the nested item protobuf message """ diff --git a/docarray/typing/tensor/__init__.py b/docarray/typing/tensor/__init__.py index 748c5a3fc21..8d7fda13010 100644 --- a/docarray/typing/tensor/__init__.py +++ b/docarray/typing/tensor/__init__.py @@ -1,3 +1,3 @@ from docarray.typing.tensor.tensor import Tensor -__all__ = ['Tensor'] \ No newline at end of file +__all__ = ['Tensor'] diff --git a/docarray/typing/tensor/tensor.py b/docarray/typing/tensor/tensor.py index b9ba90c5fcc..cf576ffe3d5 100644 --- a/docarray/typing/tensor/tensor.py +++ b/docarray/typing/tensor/tensor.py @@ -41,8 +41,9 @@ def from_ndarray(cls: Type[T], value: np.ndarray) -> T: return value.view(cls) def _to_nested_item_protobuf(self: T) -> 'NodeProto': - """Convert Document into a nested item protobuf message. This function should be called when the Document - is nested into another Document that need to be converted into a protobuf + """Convert Document into a nested item protobuf message. This function should + be called when the Document is nested into another Document that need to be + converted into a protobuf :return: the nested item protobuf message """ diff --git a/docarray/typing/url/any_url.py b/docarray/typing/url/any_url.py index d2ee91e97d2..382a01fca46 100644 --- a/docarray/typing/url/any_url.py +++ b/docarray/typing/url/any_url.py @@ -6,8 +6,9 @@ class AnyUrl(BaseAnyUrl, BaseNode): def _to_nested_item_protobuf(self) -> 'NodeProto': - """Convert Document into a nested item protobuf message. This function should be called when the Document - is nested into another Document that need to be converted into a protobuf + """Convert Document into a nested item protobuf message. This function should + be called when the Document is nested into another Document that need to + be converted into a protobuf :return: the nested item protobuf message """ From 80ee4116596ba1f2a97262a8ddf28d4baf90112d Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Mon, 14 Nov 2022 10:48:02 +0100 Subject: [PATCH 3/5] chore: move from flake height to ruff in ci and pre commit Signed-off-by: Sami Jaghouar --- .github/workflows/ci.yml | 8 ++++---- .pre-commit-config.yaml | 14 +++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5b5a2b8b56..113dbe1695f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: [push, pull_request] jobs: - lint-flake-8: + lint-ruff: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.5.0 @@ -11,16 +11,16 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.8 - - name: Lint with flake8 + - name: Lint with ruff run: | python -m pip install --upgrade pip python -m pip install poetry poetry install # stop the build if there are Python syntax errors or undefined names - poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,docarray/proto/pb2/docarray_pb2.py + poetry run ruff docarray # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist,tests/,docarray/proto/pb2/docarray_pb2.py + poetry run ruff docarray check-black: runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad8882d8f7b..b2bd7fc9613 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,4 @@ repos: -- repo: https://github.com/pycqa/flake8 - rev: 4.0.1 - hooks: - - id: flake8 - exclude: ^(.git|__pycache__|docs/source/conf.py|old|build|dist|tests|jina/resources/|docarray/proto/pb/docarray_pb2.py|docarray/proto/pb/docarray_pb2_grpc.py|jina/proto/pb2/docarray_pb2.py|jina/proto/pb2/docarray_pb2_grpc.py) - args: - - --max-complexity=10 - - --max-line-length=127 - - --select=E9,F63,F7,F82 - repo: https://github.com/ambv/black rev: 22.3.0 hooks: @@ -28,3 +19,8 @@ repos: - id: isort args: ["--profile", "black"] exclude: ^(docarray/proto/pb/docarray_pb2.py|docarray/proto/pb/docarray_pb2.py|docs/|docarray/resources/) + +- repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.116 + hooks: + - id: ruff \ No newline at end of file From 9ebda17eb730b6d62fae7e0aa678cf9f46bf6cda Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Mon, 14 Nov 2022 10:50:11 +0100 Subject: [PATCH 4/5] chore: remove flake8 Signed-off-by: Sami Jaghouar --- poetry.lock | 43 +------------------------------------------ pyproject.toml | 1 - 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/poetry.lock b/poetry.lock index d346153517e..0354841b2e0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -293,19 +293,6 @@ python-versions = ">=3.7" docs = ["furo (>=2022.6.21)", "sphinx (>=5.1.1)", "sphinx-autodoc-typehints (>=1.19.1)"] testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "pytest (>=7.1.2)", "pytest-cov (>=3)", "pytest-timeout (>=2.1)"] -[[package]] -name = "flake8" -version = "5.0.4" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.6.1" - -[package.dependencies] -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" - [[package]] name = "identify" version = "2.5.8" @@ -635,14 +622,6 @@ python-versions = ">=3.5" [package.dependencies] traitlets = "*" -[[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.6" - [[package]] name = "mistune" version = "2.0.4" @@ -1030,14 +1009,6 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[[package]] -name = "pycodestyle" -version = "2.9.1" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=3.6" - [[package]] name = "pycparser" version = "2.21" @@ -1061,14 +1032,6 @@ typing-extensions = ">=4.1.0" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] -[[package]] -name = "pyflakes" -version = "2.5.0" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=3.6" - [[package]] name = "pygments" version = "2.13.0" @@ -1416,7 +1379,7 @@ common = ["protobuf"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "554564c0d24e3fc9a7e17e1b3020fcc428dd6bdfc2f2725f5e98f1ea6bdc8270" +content-hash = "eb490e5f8674be878ab6c7966d4a5990be855f9f74350ee489959dd15f677831" [metadata.files] anyio = [] @@ -1497,7 +1460,6 @@ entrypoints = [ executing = [] fastjsonschema = [] filelock = [] -flake8 = [] identify = [] idna = [] importlib-metadata = [] @@ -1574,7 +1536,6 @@ markupsafe = [ {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] matplotlib-inline = [] -mccabe = [] mistune = [] more-itertools = [] mypy = [] @@ -1638,13 +1599,11 @@ py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] -pycodestyle = [] pycparser = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pydantic = [] -pyflakes = [] pygments = [] pyparsing = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, diff --git a/pyproject.toml b/pyproject.toml index 33b8598b281..9c18b5928e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ mypy = "^0.990" types-protobuf = "^3.20.4" black = "^22.10.0" isort = "^5.10.1" -flake8 = "^5.0.4" ruff = "^0.0.117" [build-system] From a9edd19864836a01508d9888c1780b2730a98b67 Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Mon, 14 Nov 2022 11:02:47 +0100 Subject: [PATCH 5/5] chore: remove line lenght ruff Signed-off-by: Sami Jaghouar --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9c18b5928e7..ca63286149f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,4 +42,3 @@ skip_glob= ['docarray/proto/pb2/*'] [tool.ruff] exclude = ['docarray/proto/pb2/*'] -line-length = 88 \ No newline at end of file