mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
release: v1.0.0 (#32567)
Co-authored-by: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com> Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev> Co-authored-by: ccurme <chester.curme@gmail.com> Co-authored-by: Christophe Bornet <cbornet@hotmail.com> Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com> Co-authored-by: Sadra Barikbin <sadraqazvin1@yahoo.com> Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
"""Pytest conftest."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import gzip
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from typing import Any, Union, cast
|
||||
from typing import Any, cast
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
@@ -52,7 +54,9 @@ class CustomPersister:
|
||||
|
||||
@classmethod
|
||||
def load_cassette(
|
||||
cls, cassette_path: Union[str, PathLike[str]], serializer: CustomSerializer
|
||||
cls,
|
||||
cassette_path: str | PathLike[str],
|
||||
serializer: CustomSerializer,
|
||||
) -> tuple[dict, dict]:
|
||||
"""Load a cassette from a file."""
|
||||
# If cassette path is already Path this is a no-op
|
||||
@@ -67,7 +71,7 @@ class CustomPersister:
|
||||
|
||||
@staticmethod
|
||||
def save_cassette(
|
||||
cassette_path: Union[str, PathLike[str]],
|
||||
cassette_path: str | PathLike[str],
|
||||
cassette_dict: dict,
|
||||
serializer: CustomSerializer,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user