ref: Bump ruff version to 0.8 (#5087)

This commit is contained in:
Christophe Bornet 2024-12-08 12:16:06 +01:00 • committed by GitHub
commit 2f0c67e851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 35 additions and 35 deletions

View file

@ -149,7 +149,7 @@ dev-dependencies = [
"types-redis>=4.6.0.5", "types-redis>=4.6.0.5",
"ipykernel>=6.29.0", "ipykernel>=6.29.0",
"mypy>=1.11.0", "mypy>=1.11.0",
"ruff>=0.6.2,<0.7.0", "ruff>=0.8.2,<0.9.0",
"httpx>=0.27.0", "httpx>=0.27.0",
"pytest>=8.2.0", "pytest>=8.2.0",
"types-requests>=2.32.0", "types-requests>=2.32.0",

View file

@ -9,7 +9,7 @@ import argparse
import sys import sys
from huggingface_hub import HfApi, list_models from huggingface_hub import HfApi, list_models
from rich import print from rich import print # noqa: A004
# Use root method # Use root method
models = list_models() models = list_models()

View file

@ -7,8 +7,8 @@ from loguru import logger
from typing_extensions import override from typing_extensions import override
from langflow.base.flow_processing.utils import build_data_from_result_data, format_flow_output_data from langflow.base.flow_processing.utils import build_data_from_result_data, format_flow_output_data
from langflow.graph.graph.base import Graph # cannot be a part of TYPE_CHECKING # noqa: TCH001 from langflow.graph.graph.base import Graph # cannot be a part of TYPE_CHECKING # noqa: TC001
from langflow.graph.vertex.base import Vertex # cannot be a part of TYPE_CHECKING # noqa: TCH001 from langflow.graph.vertex.base import Vertex # cannot be a part of TYPE_CHECKING # noqa: TC001
from langflow.helpers.flow import build_schema_from_inputs, get_arg_names, get_flow_inputs, run_flow from langflow.helpers.flow import build_schema_from_inputs, get_arg_names, get_flow_inputs, run_flow
from langflow.utils.async_helpers import run_until_complete from langflow.utils.async_helpers import run_until_complete

View file

@ -45,6 +45,7 @@ __all__ = [
"OpenAPIAgentComponent", "OpenAPIAgentComponent",
"RecursiveCharacterTextSplitterComponent", "RecursiveCharacterTextSplitterComponent",
"RetrievalQAComponent", "RetrievalQAComponent",
"RetrieverToolComponent",
"RunnableExecComponent", "RunnableExecComponent",
"SQLAgentComponent", "SQLAgentComponent",
"SQLDatabaseComponent", "SQLDatabaseComponent",
@ -57,5 +58,4 @@ __all__ = [
"VectorStoreInfoComponent", "VectorStoreInfoComponent",
"VectorStoreRouterAgentComponent", "VectorStoreRouterAgentComponent",
"XMLAgentComponent", "XMLAgentComponent",
"RetrieverToolComponent",
] ]

View file

@ -34,6 +34,6 @@ __all__ = [
"NVIDIAModelComponent", "NVIDIAModelComponent",
"OpenAIModelComponent", "OpenAIModelComponent",
"PerplexityComponent", "PerplexityComponent",
"SambaNovaComponent",
"QianfanChatEndpointComponent", "QianfanChatEndpointComponent",
"SambaNovaComponent",
] ]

View file

@ -21,7 +21,7 @@ from langflow.base.tools.constants import (
) )
from langflow.custom.tree_visitor import RequiredInputsVisitor from langflow.custom.tree_visitor import RequiredInputsVisitor
from langflow.exceptions.component import StreamingError from langflow.exceptions.component import StreamingError
from langflow.field_typing import Tool # noqa: TCH001 Needed by _add_toolkit_output from langflow.field_typing import Tool # noqa: TC001 Needed by _add_toolkit_output
from langflow.graph.state.model import create_state_model from langflow.graph.state.model import create_state_model
from langflow.helpers.custom import format_type from langflow.helpers.custom import format_type
from langflow.memory import astore_message, aupdate_messages, delete_message from langflow.memory import astore_message, aupdate_messages, delete_message

View file

@ -28,6 +28,7 @@ from .inputs import (
__all__ = [ __all__ = [
"BoolInput", "BoolInput",
"CodeInput", "CodeInput",
"DataFrameInput",
"DataInput", "DataInput",
"DefaultPromptField", "DefaultPromptField",
"DefaultPromptField", "DefaultPromptField",
@ -52,5 +53,4 @@ __all__ = [
"SliderInput", "SliderInput",
"StrInput", "StrInput",
"TableInput", "TableInput",
"DataFrameInput",
] ]

View file

@ -28,6 +28,7 @@ from langflow.template import Output
__all__ = [ __all__ = [
"BoolInput", "BoolInput",
"CodeInput", "CodeInput",
"DataFrameInput",
"DataInput", "DataInput",
"DefaultPromptField", "DefaultPromptField",
"DefaultPromptField", "DefaultPromptField",
@ -51,5 +52,4 @@ __all__ = [
"SliderInput", "SliderInput",
"StrInput", "StrInput",
"TableInput", "TableInput",
"DataFrameInput",
] ]

View file

@ -3,4 +3,4 @@ from .dataframe import DataFrame
from .dotdict import dotdict from .dotdict import dotdict
from .message import Message from .message import Message
__all__ = ["Data", "dotdict", "Message", "DataFrame"] __all__ = ["Data", "DataFrame", "Message", "dotdict"]

View file

@ -22,7 +22,7 @@ from langflow.schema.content_types import ErrorContent
from langflow.schema.data import Data from langflow.schema.data import Data
from langflow.schema.image import Image, get_file_paths, is_image_file from langflow.schema.image import Image, get_file_paths, is_image_file
from langflow.schema.properties import Properties, Source from langflow.schema.properties import Properties, Source
from langflow.schema.validators import timestamp_to_str_validator # noqa: TCH001 from langflow.schema.validators import timestamp_to_str_validator
from langflow.utils.constants import ( from langflow.utils.constants import (
MESSAGE_SENDER_AI, MESSAGE_SENDER_AI,
MESSAGE_SENDER_NAME_AI, MESSAGE_SENDER_NAME_AI,

View file

@ -5,7 +5,7 @@ from pathlib import Path
import httpx import httpx
import orjson import orjson
from locust import FastHttpUser, between, task from locust import FastHttpUser, between, task
from rich import print from rich import print # noqa: A004
class NameTest(FastHttpUser): class NameTest(FastHttpUser):

46
uv.lock generated
View file

@ -273,7 +273,7 @@ wheels = [
[[package]] [[package]]
name = "astra-assistants" name = "astra-assistants"
version = "2.2.6" version = "2.2.7"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "aiohttp" }, { name = "aiohttp" },
@ -288,9 +288,9 @@ dependencies = [
{ name = "tree-sitter" }, { name = "tree-sitter" },
{ name = "tree-sitter-python" }, { name = "tree-sitter-python" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/8d/91/a0402d5a8fea5f689a7a18851b6ad5eb785284db510247c356a3a6567d18/astra_assistants-2.2.6.tar.gz", hash = "sha256:708b9d05e2a3290b96e3380dd2333cdbb90687882f629c58e9d65a7ac5d8ec24", size = 67606 } sdist = { url = "https://files.pythonhosted.org/packages/81/e2/c440ba3fe475088537c7c258b2f7689b1c9724bf46cd62d7de77e3ddc79f/astra_assistants-2.2.7.tar.gz", hash = "sha256:dd88adad9a74c9839c6faade1ccdfb47b827c82f2ed2a6da92731b4190506774", size = 67687 }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/fd/6d/16d1a7b8cf586e13f4cb0a21dd13b6d565e5fad9a00e57a3fdf5f5212f2d/astra_assistants-2.2.6-py3-none-any.whl", hash = "sha256:5f790f95d5f4c9167af83563264e57efc4adfb39f804838ee7e0d1ecc3eb293d", size = 78375 }, { url = "https://files.pythonhosted.org/packages/25/61/8a165e4ed492dae66d278d485eb505689273f2a266e34e2a21bac0bec4a6/astra_assistants-2.2.7-py3-none-any.whl", hash = "sha256:2d12999f97f57a45f24c3236af7b8792de317584e58cc7eaf771e5a440a26f2d", size = 78374 },
] ]
[package.optional-dependencies] [package.optional-dependencies]
@ -3803,7 +3803,7 @@ dev = [
{ name = "pytest-xdist", specifier = ">=3.6.0" }, { name = "pytest-xdist", specifier = ">=3.6.0" },
{ name = "requests", specifier = ">=2.32.0" }, { name = "requests", specifier = ">=2.32.0" },
{ name = "respx", specifier = ">=0.21.1" }, { name = "respx", specifier = ">=0.21.1" },
{ name = "ruff", specifier = ">=0.6.2,<0.7.0" }, { name = "ruff", specifier = ">=0.8.2,<0.9.0" },
{ name = "types-aiofiles", specifier = ">=24.1.0.20240626" }, { name = "types-aiofiles", specifier = ">=24.1.0.20240626" },
{ name = "types-google-cloud-ndb", specifier = ">=2.2.0.0" }, { name = "types-google-cloud-ndb", specifier = ">=2.2.0.0" },
{ name = "types-markdown", specifier = ">=3.7.0.20240822" }, { name = "types-markdown", specifier = ">=3.7.0.20240822" },
@ -6939,27 +6939,27 @@ wheels = [
[[package]] [[package]]
name = "ruff" name = "ruff"
version = "0.6.9" version = "0.8.2"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/26/0d/6148a48dab5662ca1d5a93b7c0d13c03abd3cc7e2f35db08410e47cef15d/ruff-0.6.9.tar.gz", hash = "sha256:b076ef717a8e5bc819514ee1d602bbdca5b4420ae13a9cf61a0c0a4f53a2baa2", size = 3095355 } sdist = { url = "https://files.pythonhosted.org/packages/5e/2b/01245f4f3a727d60bebeacd7ee6d22586c7f62380a2597ddb22c2f45d018/ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5", size = 3349020 }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/6e/8f/f7a0a0ef1818662efb32ed6df16078c95da7a0a3248d64c2410c1e27799f/ruff-0.6.9-py3-none-linux_armv6l.whl", hash = "sha256:064df58d84ccc0ac0fcd63bc3090b251d90e2a372558c0f057c3f75ed73e1ccd", size = 10440526 }, { url = "https://files.pythonhosted.org/packages/91/29/366be70216dba1731a00a41f2f030822b0c96c7c4f3b2c0cdce15cbace74/ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d", size = 10530649 },
{ url = "https://files.pythonhosted.org/packages/8b/69/b179a5faf936a9e2ab45bb412a668e4661eded964ccfa19d533f29463ef6/ruff-0.6.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:140d4b5c9f5fc7a7b074908a78ab8d384dd7f6510402267bc76c37195c02a7ec", size = 10034612 }, { url = "https://files.pythonhosted.org/packages/63/82/a733956540bb388f00df5a3e6a02467b16c0e529132625fe44ce4c5fb9c7/ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5", size = 10274069 },
{ url = "https://files.pythonhosted.org/packages/c7/ef/fd1b4be979c579d191eeac37b5cfc0ec906de72c8bcd8595e2c81bb700c1/ruff-0.6.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53fd8ca5e82bdee8da7f506d7b03a261f24cd43d090ea9db9a1dc59d9313914c", size = 9706197 }, { url = "https://files.pythonhosted.org/packages/3d/12/0b3aa14d1d71546c988a28e1b412981c1b80c8a1072e977a2f30c595cc4a/ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c", size = 9909400 },
{ url = "https://files.pythonhosted.org/packages/29/61/b376d775deb5851cb48d893c568b511a6d3625ef2c129ad5698b64fb523c/ruff-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645d7d8761f915e48a00d4ecc3686969761df69fb561dd914a773c1a8266e14e", size = 10751855 }, { url = "https://files.pythonhosted.org/packages/23/08/f9f08cefb7921784c891c4151cce6ed357ff49e84b84978440cffbc87408/ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f", size = 10766782 },
{ url = "https://files.pythonhosted.org/packages/13/d7/def9e5f446d75b9a9c19b24231a3a658c075d79163b08582e56fa5dcfa38/ruff-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eae02b700763e3847595b9d2891488989cac00214da7f845f4bcf2989007d577", size = 10200889 }, { url = "https://files.pythonhosted.org/packages/e4/71/bf50c321ec179aa420c8ec40adac5ae9cc408d4d37283a485b19a2331ceb/ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897", size = 10286316 },
{ url = "https://files.pythonhosted.org/packages/6c/d6/7f34160818bcb6e84ce293a5966cba368d9112ff0289b273fbb689046047/ruff-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d5ccc9e58112441de8ad4b29dcb7a86dc25c5f770e3c06a9d57e0e5eba48829", size = 11038678 }, { url = "https://files.pythonhosted.org/packages/f2/83/c82688a2a6117539aea0ce63fdf6c08e60fe0202779361223bcd7f40bd74/ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58", size = 11338270 },
{ url = "https://files.pythonhosted.org/packages/13/34/a40ff8ae62fb1b26fb8e6fa7e64bc0e0a834b47317880de22edd6bfb54fb/ruff-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:417b81aa1c9b60b2f8edc463c58363075412866ae4e2b9ab0f690dc1e87ac1b5", size = 11808682 }, { url = "https://files.pythonhosted.org/packages/7f/d7/bc6a45e5a22e627640388e703160afb1d77c572b1d0fda8b4349f334fc66/ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29", size = 12058579 },
{ url = "https://files.pythonhosted.org/packages/2e/6d/25a4386ae4009fc798bd10ba48c942d1b0b3e459b5403028f1214b6dd161/ruff-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c866b631f5fbce896a74a6e4383407ba7507b815ccc52bcedabb6810fdb3ef7", size = 11330446 }, { url = "https://files.pythonhosted.org/packages/da/3b/64150c93946ec851e6f1707ff586bb460ca671581380c919698d6a9267dc/ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248", size = 11615172 },
{ url = "https://files.pythonhosted.org/packages/f7/f6/bdf891a9200d692c94ebcd06ae5a2fa5894e522f2c66c2a12dd5d8cb2654/ruff-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b118afbb3202f5911486ad52da86d1d52305b59e7ef2031cea3425142b97d6f", size = 12483048 }, { url = "https://files.pythonhosted.org/packages/e4/9e/cf12b697ea83cfe92ec4509ae414dc4c9b38179cc681a497031f0d0d9a8e/ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93", size = 12882398 },
{ url = "https://files.pythonhosted.org/packages/a7/86/96f4252f41840e325b3fa6c48297e661abb9f564bd7dcc0572398c8daa42/ruff-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67267654edc23c97335586774790cde402fb6bbdb3c2314f1fc087dee320bfa", size = 10936855 }, { url = "https://files.pythonhosted.org/packages/a9/27/96d10863accf76a9c97baceac30b0a52d917eb985a8ac058bd4636aeede0/ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d", size = 11176094 },
{ url = "https://files.pythonhosted.org/packages/45/87/801a52d26c8dbf73424238e9908b9ceac430d903c8ef35eab1b44fcfa2bd/ruff-0.6.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ef0cc774b00fec123f635ce5c547dac263f6ee9fb9cc83437c5904183b55ceb", size = 10713007 }, { url = "https://files.pythonhosted.org/packages/eb/10/cd2fd77d4a4e7f03c29351be0f53278a393186b540b99df68beb5304fddd/ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0", size = 10771884 },
{ url = "https://files.pythonhosted.org/packages/be/27/6f7161d90320a389695e32b6ebdbfbedde28ccbf52451e4b723d7ce744ad/ruff-0.6.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:12edd2af0c60fa61ff31cefb90aef4288ac4d372b4962c2864aeea3a1a2460c0", size = 10274594 }, { url = "https://files.pythonhosted.org/packages/71/5d/beabb2ff18870fc4add05fa3a69a4cb1b1d2d6f83f3cf3ae5ab0d52f455d/ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa", size = 10382535 },
{ url = "https://files.pythonhosted.org/packages/00/52/dc311775e7b5f5b19831563cb1572ecce63e62681bccc609867711fae317/ruff-0.6.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:55bb01caeaf3a60b2b2bba07308a02fca6ab56233302406ed5245180a05c5625", size = 10608024 }, { url = "https://files.pythonhosted.org/packages/ae/29/6b3fdf3ad3e35b28d87c25a9ff4c8222ad72485ab783936b2b267250d7a7/ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f", size = 10886995 },
{ url = "https://files.pythonhosted.org/packages/98/b6/be0a1ddcbac65a30c985cf7224c4fce786ba2c51e7efeb5178fe410ed3cf/ruff-0.6.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:925d26471fa24b0ce5a6cdfab1bb526fb4159952385f386bdcc643813d472039", size = 10982085 }, { url = "https://files.pythonhosted.org/packages/e9/dc/859d889b4d9356a1a2cdbc1e4a0dda94052bc5b5300098647e51a58c430b/ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22", size = 11220750 },
{ url = "https://files.pythonhosted.org/packages/bb/a4/c84bc13d0b573cf7bb7d17b16d6d29f84267c92d79b2f478d4ce322e8e72/ruff-0.6.9-py3-none-win32.whl", hash = "sha256:eb61ec9bdb2506cffd492e05ac40e5bc6284873aceb605503d8494180d6fc84d", size = 8522088 }, { url = "https://files.pythonhosted.org/packages/0b/08/e8f519f61f1d624264bfd6b8829e4c5f31c3c61193bc3cff1f19dbe7626a/ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1", size = 8729396 },
{ url = "https://files.pythonhosted.org/packages/74/be/fc352bd8ca40daae8740b54c1c3e905a7efe470d420a268cd62150248c91/ruff-0.6.9-py3-none-win_amd64.whl", hash = "sha256:785d31851c1ae91f45b3d8fe23b8ae4b5170089021fbb42402d811135f0b7117", size = 9359275 }, { url = "https://files.pythonhosted.org/packages/f8/d4/ba1c7ab72aba37a2b71fe48ab95b80546dbad7a7f35ea28cf66fc5cea5f6/ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea", size = 9594729 },
{ url = "https://files.pythonhosted.org/packages/3e/14/fd026bc74ded05e2351681545a5f626e78ef831f8edce064d61acd2e6ec7/ruff-0.6.9-py3-none-win_arm64.whl", hash = "sha256:a9641e31476d601f83cd602608739a0840e348bda93fec9f1ee816f8b6798b93", size = 8679879 }, { url = "https://files.pythonhosted.org/packages/23/34/db20e12d3db11b8a2a8874258f0f6d96a9a4d631659d54575840557164c8/ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8", size = 9035131 },
] ]
[[package]] [[package]]