mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 14:26:48 +00:00
core: Add ruff rules ANN (type annotations) (#29271)
See https://docs.astral.sh/ruff/rules/#flake8-annotations-ann The interest compared to only mypy is that ruff is very fast at detecting missing annotations. ANN101 and ANN102 are deprecated so we ignore them ANN401 (no Any type) ignored to be in sync with mypy config --------- Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
committed by
GitHub
parent
979a991dc2
commit
f6d4fec4d5
@@ -4641,7 +4641,7 @@ class RunnableLambda(Runnable[Input, Output]):
|
||||
)
|
||||
|
||||
@wraps(func)
|
||||
async def f(*args, **kwargs): # type: ignore[no-untyped-def]
|
||||
async def f(*args: Any, **kwargs: Any) -> Any:
|
||||
return await run_in_executor(config, func, *args, **kwargs)
|
||||
|
||||
afunc = f
|
||||
@@ -4889,7 +4889,7 @@ class RunnableLambda(Runnable[Input, Output]):
|
||||
)
|
||||
|
||||
@wraps(func)
|
||||
async def f(*args, **kwargs): # type: ignore[no-untyped-def]
|
||||
async def f(*args: Any, **kwargs: Any) -> Any:
|
||||
return await run_in_executor(config, func, *args, **kwargs)
|
||||
|
||||
afunc = f
|
||||
|
Reference in New Issue
Block a user