mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 08:58:48 +00:00
ollama: add pydocstyle linting for ollama (#27686)
Description: add lint docstrings for ollama module Issue: the issue https://github.com/langchain-ai/langchain/issues/23188 @baskaryan test: ruff check passed. <img width="311" alt="e94c68ffa93dd518297a95a93de5217" src="https://github.com/user-attachments/assets/e96bf721-e0e3-44de-a50e-206603de398e"> Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
a8a33b2dc6
commit
3952ee31b8
@ -1,3 +1,9 @@
|
|||||||
|
"""This is the langchain_ollama package.
|
||||||
|
|
||||||
|
It provides infrastructure for interacting with the Ollama service.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
from importlib import metadata
|
from importlib import metadata
|
||||||
|
|
||||||
from langchain_ollama.chat_models import ChatOllama
|
from langchain_ollama.chat_models import ChatOllama
|
||||||
|
@ -90,7 +90,7 @@ def _lc_tool_call_to_openai_tool_call(tool_call: ToolCall) -> dict:
|
|||||||
|
|
||||||
|
|
||||||
class ChatOllama(BaseChatModel):
|
class ChatOllama(BaseChatModel):
|
||||||
"""Ollama chat model integration.
|
r"""Ollama chat model integration.
|
||||||
|
|
||||||
.. dropdown:: Setup
|
.. dropdown:: Setup
|
||||||
:open:
|
:open:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
"""Ollama embeddings models."""
|
||||||
from typing import (
|
from typing import (
|
||||||
List,
|
List,
|
||||||
Optional,
|
Optional,
|
||||||
|
@ -24,7 +24,20 @@ ollama = ">=0.3.0,<1"
|
|||||||
langchain-core = "^0.3.0"
|
langchain-core = "^0.3.0"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "T201"]
|
select = [
|
||||||
|
"E", # pycodestyle
|
||||||
|
"F", # pyflakes
|
||||||
|
"I", # isort
|
||||||
|
"T201", # print
|
||||||
|
"D", # pydocstyle
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.ruff.lint.pydocstyle]
|
||||||
|
convention = "google"
|
||||||
|
|
||||||
|
[tool.ruff.lint.per-file-ignores]
|
||||||
|
"tests/**" = ["D"] # ignore docstring checks for tests
|
||||||
|
|
||||||
[tool.coverage.run]
|
[tool.coverage.run]
|
||||||
omit = ["tests/*"]
|
omit = ["tests/*"]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
"""load multiple Python files specified as command line arguments."""
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
|
Loading…
Reference in New Issue
Block a user