Skip to content

Commit a6b0872

Browse files
authored
chore: bump inline-snapshot version to 0.28.0 (#2590)
1 parent 478a348 commit a6b0872

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dev-dependencies = [
6464
"dirty-equals>=0.6.0",
6565
"importlib-metadata>=6.7.0",
6666
"rich>=13.7.1",
67-
"inline-snapshot >=0.7.0",
67+
"inline-snapshot>=0.28.0",
6868
"azure-identity >=1.14.1",
6969
"types-tqdm > 4",
7070
"types-pyaudio > 0",

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ idna==3.4
9090
importlib-metadata==7.0.0
9191
iniconfig==2.0.0
9292
# via pytest
93-
inline-snapshot==0.27.0
93+
inline-snapshot==0.28.0
9494
jiter==0.5.0
9595
# via openai
9696
markdown-it-py==3.0.0

tests/lib/chat/test_completions_streaming.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
external,
1414
snapshot,
1515
outsource, # pyright: ignore[reportUnknownVariableType]
16+
get_snapshot_value,
1617
)
1718

1819
import openai
@@ -30,7 +31,7 @@
3031
)
3132
from openai.lib._parsing._completions import ResponseFormatT
3233

33-
from ..utils import print_obj, get_snapshot_value
34+
from ..utils import print_obj
3435
from ...conftest import base_url
3536

3637
_T = TypeVar("_T")

tests/lib/snapshots.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
import httpx
99
from respx import MockRouter
10+
from inline_snapshot import get_snapshot_value
1011

1112
from openai import OpenAI, AsyncOpenAI
1213

13-
from .utils import get_snapshot_value
14-
1514
_T = TypeVar("_T")
1615

1716

tests/lib/utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,3 @@ def get_caller_name(*, stacklevel: int = 1) -> str:
5252
def clear_locals(string: str, *, stacklevel: int) -> str:
5353
caller = get_caller_name(stacklevel=stacklevel + 1)
5454
return string.replace(f"{caller}.<locals>.", "")
55-
56-
57-
def get_snapshot_value(snapshot: Any) -> Any:
58-
if not hasattr(snapshot, "_old_value"):
59-
return snapshot
60-
61-
old = snapshot._old_value
62-
if not hasattr(old, "value"):
63-
return old
64-
65-
loader = getattr(old.value, "_load_value", None)
66-
return loader() if loader else old.value

0 commit comments

Comments
 (0)