mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-01 20:14:01 -04:00
Bump ruff from 0.1.15 to 0.15.0 (#850)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.15 to 0.15.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.15.0</h2> <h2>Release Notes</h2> <p>Released on 2026-02-03.</p> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.15.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <ul> <li> <p>Ruff now formats your code according to the 2026 style guide. See the formatter section below or in the blog post for a detailed list of changes.</p> </li> <li> <p>The linter now supports block suppression comments. For example, to suppress <code>N803</code> for all parameters in this function:</p> <pre lang="python"><code># ruff: disable[N803] def foo( legacyArg1, legacyArg2, legacyArg3, legacyArg4, ): ... # ruff: enable[N803] </code></pre> <p>See the <a href="https://docs.astral.sh/ruff/linter/#block-level">documentation</a> for more details.</p> </li> <li> <p>The <code>ruff:alpine</code> Docker image is now based on Alpine 3.23 (up from 3.21).</p> </li> <li> <p>The <code>ruff:debian</code> and <code>ruff:debian-slim</code> Docker images are now based on Debian 13 "Trixie" instead of Debian 12 "Bookworm."</p> </li> <li> <p>Binaries for the <code>ppc64</code> (64-bit big-endian PowerPC) architecture are no longer included in our releases. It should still be possible to build Ruff manually for this platform, if needed.</p> </li> <li> <p>Ruff now resolves all <code>extend</code>ed configuration files before falling back on a default Python version.</p> </li> </ul> <h3>Stabilization</h3> <p>The following rules have been stabilized and are no longer in preview:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/blocking-http-call-httpx-in-async-function"><code>blocking-http-call-httpx-in-async-function</code></a> (<code>ASYNC212</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/blocking-path-method-in-async-function"><code>blocking-path-method-in-async-function</code></a> (<code>ASYNC240</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/blocking-input-in-async-function"><code>blocking-input-in-async-function</code></a> (<code>ASYNC250</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/map-without-explicit-strict"><code>map-without-explicit-strict</code></a> (<code>B912</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/if-exp-instead-of-or-operator"><code>if-exp-instead-of-or-operator</code></a> (<code>FURB110</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/single-item-membership-test"><code>single-item-membership-test</code></a> (<code>FURB171</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/missing-maxsplit-arg"><code>missing-maxsplit-arg</code></a> (<code>PLC0207</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/unnecessary-lambda"><code>unnecessary-lambda</code></a> (<code>PLW0108</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/unnecessary-empty-iterable-within-deque-call"><code>unnecessary-empty-iterable-within-deque-call</code></a> (<code>RUF037</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/in-empty-collection"><code>in-empty-collection</code></a> (<code>RUF060</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/legacy-form-pytest-raises"><code>legacy-form-pytest-raises</code></a> (<code>RUF061</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/non-octal-permissions"><code>non-octal-permissions</code></a> (<code>RUF064</code>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.15.0</h2> <p>Released on 2026-02-03.</p> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.15.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <ul> <li> <p>Ruff now formats your code according to the 2026 style guide. See the formatter section below or in the blog post for a detailed list of changes.</p> </li> <li> <p>The linter now supports block suppression comments. For example, to suppress <code>N803</code> for all parameters in this function:</p> <pre lang="python"><code># ruff: disable[N803] def foo( legacyArg1, legacyArg2, legacyArg3, legacyArg4, ): ... # ruff: enable[N803] </code></pre> <p>See the <a href="https://docs.astral.sh/ruff/linter/#block-level">documentation</a> for more details.</p> </li> <li> <p>The <code>ruff:alpine</code> Docker image is now based on Alpine 3.23 (up from 3.21).</p> </li> <li> <p>The <code>ruff:debian</code> and <code>ruff:debian-slim</code> Docker images are now based on Debian 13 "Trixie" instead of Debian 12 "Bookworm."</p> </li> <li> <p>Binaries for the <code>ppc64</code> (64-bit big-endian PowerPC) architecture are no longer included in our releases. It should still be possible to build Ruff manually for this platform, if needed.</p> </li> <li> <p>Ruff now resolves all <code>extend</code>ed configuration files before falling back on a default Python version.</p> </li> </ul> <h3>Stabilization</h3> <p>The following rules have been stabilized and are no longer in preview:</p> <ul> <li><a href="https://docs.astral.sh/ruff/rules/blocking-http-call-httpx-in-async-function"><code>blocking-http-call-httpx-in-async-function</code></a> (<code>ASYNC212</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/blocking-path-method-in-async-function"><code>blocking-path-method-in-async-function</code></a> (<code>ASYNC240</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/blocking-input-in-async-function"><code>blocking-input-in-async-function</code></a> (<code>ASYNC250</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/map-without-explicit-strict"><code>map-without-explicit-strict</code></a> (<code>B912</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/if-exp-instead-of-or-operator"><code>if-exp-instead-of-or-operator</code></a> (<code>FURB110</code>)</li> <li><a href="https://docs.astral.sh/ruff/rules/single-item-membership-test"><code>single-item-membership-test</code></a> (<code>FURB171</code>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/ce5f7b6127a5d684e96fd0f8e387f73c41c7a1b0"><code>ce5f7b6</code></a> Bump 0.15.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/23055">#23055</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b4e40f539cdbafac8afd6e510994ca64c3b317b9"><code>b4e40f5</code></a> [ty] Fix <code>__contains__</code> to respect descriptors (<a href="https://redirect.github.com/astral-sh/ruff/issues/23056">#23056</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/848cb72dc14b4c9409bf08e8323b4119d6b90005"><code>848cb72</code></a> [ty] Fix narrowing of nonlocal variables with conditional assignments (<a href="https://redirect.github.com/astral-sh/ruff/issues/22966">#22966</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/da7f33af22c7da3f3cb9321f776dda4131dda3cb"><code>da7f33a</code></a> [ty] Add a diagnostic for <code>Final</code> without assignment (<a href="https://redirect.github.com/astral-sh/ruff/issues/23001">#23001</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e65f9a6b039fa411e5609a7bda9bb7ffd11e9b1a"><code>e65f9a6</code></a> Document markdown formatting feature (<a href="https://redirect.github.com/astral-sh/ruff/issues/22990">#22990</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/c0c1b985c9ec4b3570b0a28af69ad6776a3ec401"><code>c0c1b98</code></a> Format markdown code blocks with line-by-line regex parse (<a href="https://redirect.github.com/astral-sh/ruff/issues/22996">#22996</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9f8f3e196bd6d4f2c572075536dd38b769c48087"><code>9f8f3e1</code></a> Allow positional-only params with defaults in method overrides (<a href="https://redirect.github.com/astral-sh/ruff/issues/23037">#23037</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/ef83810e118e3e41aa6c63f87f8a8147363a3e56"><code>ef83810</code></a> [ty] ecosystem-analyzer: Support bare git repositories (<a href="https://redirect.github.com/astral-sh/ruff/issues/23054">#23054</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/54dfee4cb800c0b0890b2b2c74c64cc45584194c"><code>54dfee4</code></a> Customize where the <code>fix_title</code> sub-diagnostic appears (<a href="https://redirect.github.com/astral-sh/ruff/issues/23044">#23044</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b53460799b592e5276e1d148d8a48469f396032e"><code>b534607</code></a> 2026 Ruff Formatter Style (<a href="https://redirect.github.com/astral-sh/ruff/issues/22735">#22735</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.1.15...0.15.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com>
This commit is contained in:
@@ -32,12 +32,12 @@ lint format: PYTHON_FILES=.
|
||||
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=. --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
||||
|
||||
lint lint_diff:
|
||||
poetry run ruff .
|
||||
poetry run ruff check .
|
||||
poetry run ruff format $(PYTHON_FILES) --check
|
||||
|
||||
format format_diff:
|
||||
poetry run ruff format $(PYTHON_FILES)
|
||||
poetry run ruff --select I --fix $(PYTHON_FILES)
|
||||
poetry run ruff check --select I --fix $(PYTHON_FILES)
|
||||
|
||||
spell_check:
|
||||
poetry run codespell --toml pyproject.toml
|
||||
|
||||
@@ -10,6 +10,7 @@ By default, exceptions are serialized as a generic exception without
|
||||
any information about the exception. This is done to prevent leaking
|
||||
sensitive information from the server to the client.
|
||||
"""
|
||||
|
||||
import abc
|
||||
import logging
|
||||
from functools import lru_cache
|
||||
@@ -239,7 +240,7 @@ def load_events(events: Any) -> List[Dict[str, Any]]:
|
||||
except ValidationError as e:
|
||||
msg = f"Encountered an invalid event: {e}"
|
||||
if "type" in decoded_event_data:
|
||||
msg += f' of type {repr(decoded_event_data["type"])}'
|
||||
msg += f" of type {repr(decoded_event_data['type'])}"
|
||||
_log_error_message_once(msg)
|
||||
continue
|
||||
|
||||
|
||||
+8
-8
@@ -5,6 +5,7 @@ This code contains integration for langchain runnables with FastAPI.
|
||||
The main entry point is the `add_routes` function which adds the routes to an existing
|
||||
FastAPI app or APIRouter.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
import weakref
|
||||
from typing import (
|
||||
@@ -151,9 +152,8 @@ class _EndpointConfiguration:
|
||||
else:
|
||||
enabled_endpoints_ = set(name.lower() for name in enabled_endpoints)
|
||||
if enabled_endpoints_ - KNOWN_ENDPOINTS:
|
||||
raise ValueError(
|
||||
f"Got unknown endpoint names: {enabled_endpoints_- KNOWN_ENDPOINTS}"
|
||||
)
|
||||
unknown = enabled_endpoints_ - KNOWN_ENDPOINTS
|
||||
raise ValueError(f"Got unknown endpoint names: {unknown}")
|
||||
is_invoke_enabled = "invoke" in enabled_endpoints_
|
||||
is_batch_enabled = "batch" in enabled_endpoints_
|
||||
is_stream_enabled = "stream" in enabled_endpoints_
|
||||
@@ -234,12 +234,12 @@ def _setup_global_app_handlers(
|
||||
if endpoint_configuration.is_playground_enabled:
|
||||
print(
|
||||
f'{green("LANGSERVE:")} Playground for chain "{path or ""}/" '
|
||||
f'is live at:'
|
||||
f"is live at:"
|
||||
)
|
||||
print(f'{green("LANGSERVE:")} │')
|
||||
print(f'{green("LANGSERVE:")} └──> {path}/playground/')
|
||||
print(f'{green("LANGSERVE:")}')
|
||||
print(f'{green("LANGSERVE:")} See all available routes at {app.docs_url}/')
|
||||
print(f"{green('LANGSERVE:')} │")
|
||||
print(f"{green('LANGSERVE:')} └──> {path}/playground/")
|
||||
print(f"{green('LANGSERVE:')}")
|
||||
print(f"{green('LANGSERVE:')} See all available routes at {app.docs_url}/")
|
||||
|
||||
|
||||
# PUBLIC API
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Adapted from https://github.com/florimondmanca/httpx-sse"""
|
||||
|
||||
from contextlib import asynccontextmanager, contextmanager
|
||||
from typing import Any, AsyncIterator, Iterator, List, Optional
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Models are created with a namespace to avoid name collisions when hosting
|
||||
multiple runnables. When present the name collisions prevent fastapi from
|
||||
generating OpenAPI specs.
|
||||
"""
|
||||
|
||||
from typing import Any, Dict, List, Literal, Optional, Sequence, Union
|
||||
from uuid import UUID
|
||||
|
||||
@@ -271,8 +272,7 @@ def create_invoke_response_model(
|
||||
Field(
|
||||
...,
|
||||
description=(
|
||||
"Metadata about the response that may be useful to "
|
||||
"specific clients"
|
||||
"Metadata about the response that may be useful to specific clients"
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Main entrypoint into package."""
|
||||
|
||||
from importlib import metadata
|
||||
|
||||
try:
|
||||
|
||||
Generated
+20
-19
@@ -3534,29 +3534,30 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.1.15"
|
||||
version = "0.15.0"
|
||||
description = "An extremely fast Python linter and code formatter, written in Rust."
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
groups = ["lint"]
|
||||
files = [
|
||||
{file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:5fe8d54df166ecc24106db7dd6a68d44852d14eb0729ea4672bb4d96c320b7df"},
|
||||
{file = "ruff-0.1.15-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6f0bfbb53c4b4de117ac4d6ddfd33aa5fc31beeaa21d23c45c6dd249faf9126f"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0d432aec35bfc0d800d4f70eba26e23a352386be3a6cf157083d18f6f5881c8"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9405fa9ac0e97f35aaddf185a1be194a589424b8713e3b97b762336ec79ff807"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c66ec24fe36841636e814b8f90f572a8c0cb0e54d8b5c2d0e300d28a0d7bffec"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6f8ad828f01e8dd32cc58bc28375150171d198491fc901f6f98d2a39ba8e3ff5"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86811954eec63e9ea162af0ffa9f8d09088bab51b7438e8b6488b9401863c25e"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fd4025ac5e87d9b80e1f300207eb2fd099ff8200fa2320d7dc066a3f4622dc6b"},
|
||||
{file = "ruff-0.1.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b17b93c02cdb6aeb696effecea1095ac93f3884a49a554a9afa76bb125c114c1"},
|
||||
{file = "ruff-0.1.15-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ddb87643be40f034e97e97f5bc2ef7ce39de20e34608f3f829db727a93fb82c5"},
|
||||
{file = "ruff-0.1.15-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:abf4822129ed3a5ce54383d5f0e964e7fef74a41e48eb1dfad404151efc130a2"},
|
||||
{file = "ruff-0.1.15-py3-none-musllinux_1_2_i686.whl", hash = "sha256:6c629cf64bacfd136c07c78ac10a54578ec9d1bd2a9d395efbee0935868bf852"},
|
||||
{file = "ruff-0.1.15-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1bab866aafb53da39c2cadfb8e1c4550ac5340bb40300083eb8967ba25481447"},
|
||||
{file = "ruff-0.1.15-py3-none-win32.whl", hash = "sha256:2417e1cb6e2068389b07e6fa74c306b2810fe3ee3476d5b8a96616633f40d14f"},
|
||||
{file = "ruff-0.1.15-py3-none-win_amd64.whl", hash = "sha256:3837ac73d869efc4182d9036b1405ef4c73d9b1f88da2413875e34e0d6919587"},
|
||||
{file = "ruff-0.1.15-py3-none-win_arm64.whl", hash = "sha256:9a933dfb1c14ec7a33cceb1e49ec4a16b51ce3c20fd42663198746efc0427360"},
|
||||
{file = "ruff-0.1.15.tar.gz", hash = "sha256:f6dfa8c1b21c913c326919056c390966648b680966febcb796cc9d1aaab8564e"},
|
||||
{file = "ruff-0.15.0-py3-none-linux_armv6l.whl", hash = "sha256:aac4ebaa612a82b23d45964586f24ae9bc23ca101919f5590bdb368d74ad5455"},
|
||||
{file = "ruff-0.15.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:dcd4be7cc75cfbbca24a98d04d0b9b36a270d0833241f776b788d59f4142b14d"},
|
||||
{file = "ruff-0.15.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d747e3319b2bce179c7c1eaad3d884dc0a199b5f4d5187620530adf9105268ce"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:650bd9c56ae03102c51a5e4b554d74d825ff3abe4db22b90fd32d816c2e90621"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a6664b7eac559e3048223a2da77769c2f92b43a6dfd4720cef42654299a599c9"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f811f97b0f092b35320d1556f3353bf238763420ade5d9e62ebd2b73f2ff179"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:761ec0a66680fab6454236635a39abaf14198818c8cdf691e036f4bc0f406b2d"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:940f11c2604d317e797b289f4f9f3fa5555ffe4fb574b55ed006c3d9b6f0eb78"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcbca3d40558789126da91d7ef9a7c87772ee107033db7191edefa34e2c7f1b4"},
|
||||
{file = "ruff-0.15.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:9a121a96db1d75fa3eb39c4539e607f628920dd72ff1f7c5ee4f1b768ac62d6e"},
|
||||
{file = "ruff-0.15.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5298d518e493061f2eabd4abd067c7e4fb89e2f63291c94332e35631c07c3662"},
|
||||
{file = "ruff-0.15.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:afb6e603d6375ff0d6b0cee563fa21ab570fd15e65c852cb24922cef25050cf1"},
|
||||
{file = "ruff-0.15.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:77e515f6b15f828b94dc17d2b4ace334c9ddb7d9468c54b2f9ed2b9c1593ef16"},
|
||||
{file = "ruff-0.15.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6f6e80850a01eb13b3e42ee0ebdf6e4497151b48c35051aab51c101266d187a3"},
|
||||
{file = "ruff-0.15.0-py3-none-win32.whl", hash = "sha256:238a717ef803e501b6d51e0bdd0d2c6e8513fe9eec14002445134d3907cd46c3"},
|
||||
{file = "ruff-0.15.0-py3-none-win_amd64.whl", hash = "sha256:dd5e4d3301dc01de614da3cdffc33d4b1b96fb89e45721f1598e5532ccf78b18"},
|
||||
{file = "ruff-0.15.0-py3-none-win_arm64.whl", hash = "sha256:c480d632cc0ca3f0727acac8b7d053542d9e114a462a145d0b00e7cd658c515a"},
|
||||
{file = "ruff-0.15.0.tar.gz", hash = "sha256:6bdea47cdbea30d40f8f8d7d69c0854ba7c15420ec75a26f463290949d7f7e9a"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4615,4 +4616,4 @@ server = ["fastapi", "sse-starlette"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.9"
|
||||
content-hash = "9c21c6beeb503a2216d570dbb1cbb97ace99cfabc1fed015ff91d85173c47831"
|
||||
content-hash = "847b91fede4ffa94a4a9afef9768cdd23fc40c26e65966fe59ea80e879752f11"
|
||||
|
||||
+7
-5
@@ -26,7 +26,7 @@ sse-starlette = "^1.3.0"
|
||||
[tool.poetry.group.typing.dependencies]
|
||||
|
||||
[tool.poetry.group.lint.dependencies]
|
||||
ruff = "^0.1.4"
|
||||
ruff = "^0.15.0"
|
||||
codespell = "^2.2.0"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
@@ -53,16 +53,18 @@ server = ["sse-starlette", "fastapi"]
|
||||
all = ["sse-starlette", "fastapi"]
|
||||
|
||||
[tool.ruff]
|
||||
# Same as Black.
|
||||
line-length = 88
|
||||
extend-exclude = ["examples"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
]
|
||||
|
||||
# Same as Black.
|
||||
line-length = 88
|
||||
|
||||
[tool.ruff.isort]
|
||||
[tool.ruff.lint.isort]
|
||||
# TODO(Team): Temporary to make isort work with examples.
|
||||
# examples assume langserve is available as a 3rd party package
|
||||
# For simplicity we'll define it as first party for now can update later.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Test the server and client together."""
|
||||
|
||||
import asyncio
|
||||
import datetime
|
||||
import json
|
||||
@@ -1640,12 +1641,7 @@ async def test_input_config_output_schemas() -> None:
|
||||
"properties": {
|
||||
"template": {
|
||||
"default": "say {name}",
|
||||
"description": "The "
|
||||
"template "
|
||||
"to use "
|
||||
"for "
|
||||
"the "
|
||||
"prompt",
|
||||
"description": "The template to use for the prompt",
|
||||
"title": "Template",
|
||||
"type": "string",
|
||||
}
|
||||
@@ -1676,12 +1672,7 @@ async def test_input_config_output_schemas() -> None:
|
||||
"properties": {
|
||||
"template": {
|
||||
"default": "say {name}",
|
||||
"description": "The "
|
||||
"template "
|
||||
"to use "
|
||||
"for "
|
||||
"the "
|
||||
"prompt",
|
||||
"description": "The template to use for the prompt",
|
||||
"title": "Template",
|
||||
"type": "string",
|
||||
}
|
||||
@@ -2429,9 +2420,9 @@ async def test_endpoint_configurations() -> None:
|
||||
error_codes = {404}
|
||||
else:
|
||||
error_codes = {404, 405}
|
||||
assert (
|
||||
response.status_code not in error_codes
|
||||
), f"endpoint {endpoint} should be on"
|
||||
assert response.status_code not in error_codes, (
|
||||
f"endpoint {endpoint} should be on"
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
# Passing "invoke" instead of ["invoke"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Test utilities for streaming."""
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import uuid
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Fake Chat Model wrapper for testing purposes."""
|
||||
|
||||
import asyncio
|
||||
import re
|
||||
import time
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Tests for verifying that testing utility code works as expected."""
|
||||
|
||||
from itertools import cycle
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from uuid import UUID
|
||||
|
||||
Reference in New Issue
Block a user