Skip to content

Commit 19c58e6

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): test updates (#463)
1 parent b62b180 commit 19c58e6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/finch/_utils/_reflection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def assert_signatures_in_sync(
3434

3535
if custom_param.annotation != source_param.annotation:
3636
errors.append(
37-
f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(source_param.annotation)}"
37+
f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(custom_param.annotation)}"
3838
)
3939
continue
4040

tests/utils.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from datetime import date, datetime
99
from typing_extensions import Literal, get_args, get_origin, assert_type
1010

11-
from finch._types import NoneType
11+
from finch._types import Omit, NoneType
1212
from finch._utils import (
1313
is_dict,
1414
is_list,
@@ -139,11 +139,15 @@ def _assert_list_type(type_: type[object], value: object) -> None:
139139

140140

141141
@contextlib.contextmanager
142-
def update_env(**new_env: str) -> Iterator[None]:
142+
def update_env(**new_env: str | Omit) -> Iterator[None]:
143143
old = os.environ.copy()
144144

145145
try:
146-
os.environ.update(new_env)
146+
for name, value in new_env.items():
147+
if isinstance(value, Omit):
148+
os.environ.pop(name, None)
149+
else:
150+
os.environ[name] = value
147151

148152
yield None
149153
finally:

0 commit comments

Comments
 (0)