From 00f699c60d7959dcc742681e87410f6c835e33e9 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Tue, 9 Sep 2025 16:12:18 +0200 Subject: [PATCH] chore(core): cleanup `pyproject.toml` (#32865) --- libs/core/pyproject.toml | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/libs/core/pyproject.toml b/libs/core/pyproject.toml index 50140edb77b..3c978f4f04a 100644 --- a/libs/core/pyproject.toml +++ b/libs/core/pyproject.toml @@ -65,13 +65,12 @@ langchain-text-splitters = { path = "../text-splitters" } [tool.mypy] plugins = ["pydantic.mypy"] -strict = "True" -strict_bytes = "True" +strict = true enable_error_code = "deprecated" # TODO: activate for 'strict' checking -disallow_any_generics = "False" -warn_return_any = "False" +disallow_any_generics = false +warn_return_any = false [tool.ruff] @@ -83,11 +82,6 @@ docstring-code-format = true [tool.ruff.lint] select = [ "ALL",] ignore = [ - "C90", # McCabe complexity - "COM812", # Messes with the formatter - "CPY", # No copyright - "FIX002", # Line contains TODO - "ISC001", # Messes with the formatter "C90", # McCabe complexity "COM812", # Messes with the formatter "CPY", # No copyright @@ -101,13 +95,6 @@ ignore = [ "TC003", # Doesn't play well with Pydantic "TD002", # Missing author in TODO "TD003", # Missing issue link in TODO - "PLR09", # Too many something (arg, statements, etc) - "RUF012", # Doesn't play well with Pydantic - "TC001", # Doesn't play well with Pydantic - "TC002", # Doesn't play well with Pydantic - "TC003", # Doesn't play well with Pydantic - "TD002", # Missing author in TODO - "TD003", # Missing issue link in TODO # TODO rules "ANN401", # No Any types @@ -116,7 +103,10 @@ ignore = [ "ERA", # No commented-out code "PLR2004", # Comparison to magic number ] -unfixable = ["PLW1510",] +unfixable = [ + "B028", # People should intentionally tune the stacklevel + "PLW1510", # People should intentionally set the check argument +] flake8-annotations.allow-star-arg-any = true flake8-annotations.mypy-init-return = true @@ -127,6 +117,12 @@ pydocstyle.convention = "google" pydocstyle.ignore-var-parameters = true pyupgrade.keep-runtime-typing = true +[tool.ruff.lint.per-file-ignores] +"langchain_core/utils/mustache.py" = [ "PLW0603",] +"tests/unit_tests/test_tools.py" = [ "ARG",] +"tests/**" = [ "D1", "S", "SLF",] +"scripts/**" = [ "INP", "S",] + [tool.coverage.run] omit = [ "tests/*",] @@ -137,8 +133,3 @@ asyncio_mode = "auto" filterwarnings = [ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",] asyncio_default_fixture_loop_scope = "function" -[tool.ruff.lint.per-file-ignores] -"langchain_core/utils/mustache.py" = [ "PLW0603",] -"tests/unit_tests/test_tools.py" = [ "ARG",] -"tests/**" = [ "D1", "S", "SLF",] -"scripts/**" = [ "INP", "S",]