mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 22:42:05 +00:00
community[patch]: Add missing annotations (#24890)
This PR adds annotations in comunity package. Annotations are only strictly needed in subclasses of BaseModel for pydantic 2 compatibility. This PR adds some unnecessary annotations, but they're not bad to have regardless for documentation pages.
This commit is contained in:
@@ -9,7 +9,7 @@ import os
|
||||
import re
|
||||
from importlib.metadata import version
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Pattern, cast
|
||||
|
||||
from langchain_core.utils import pre_init
|
||||
|
||||
@@ -164,7 +164,7 @@ class _KineticaLlmFileContextParser:
|
||||
"""Parser for Kinetica LLM context datafiles."""
|
||||
|
||||
# parse line into a dict containing role and content
|
||||
PARSER = re.compile(r"^<\|(?P<role>\w+)\|>\W*(?P<content>.*)$", re.DOTALL)
|
||||
PARSER: Pattern = re.compile(r"^<\|(?P<role>\w+)\|>\W*(?P<content>.*)$", re.DOTALL)
|
||||
|
||||
@classmethod
|
||||
def _removesuffix(cls, text: str, suffix: str) -> str:
|
||||
|
Reference in New Issue
Block a user