Skip to content

Commit ff738df

Browse files
Lock file maintenance (#348)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: James Braza <jamesbraza@gmail.com>
1 parent 6710954 commit ff738df

3 files changed

Lines changed: 916 additions & 874 deletions

File tree

packages/lfrqa/tests/test_lfrqa_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_availability() -> None:
2121
@pytest.fixture(name="mini_lfrqa", scope="module")
2222
def fixture_mini_lfrqa() -> list[LFRQAQuestion]:
2323
return [
24-
LFRQAQuestion(**row) # type: ignore[misc]
24+
LFRQAQuestion(**row) # type: ignore[arg-type]
2525
for row in pd.read_csv(MINI_LFRQA_CSV)[
2626
["qid", "question", "answer", "gold_doc_ids"]
2727
].to_dict(orient="records")

src/aviary/tools/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def from_function(
401401
"""Hydrate this class via inspection from a free function with a docstring."""
402402
fxn_name = function.__name__
403403
# now we parse descriptions from the docstring
404-
docstring = parse(function.__doc__, style=docstring_style) # type: ignore[arg-type] # SEE: https://github.com/rr-/docstring_parser/issues/88
404+
docstring = parse(function.__doc__, style=docstring_style)
405405
if not docstring.description:
406406
raise ValueError(f"Missing docstring for function {fxn_name}.")
407407
# now we parse descriptions from the docstring
@@ -447,9 +447,8 @@ def from_function(
447447
Field(**field_config),
448448
)
449449

450-
json_schema = create_model( # type: ignore[call-overload]
451-
"FieldDefinitions", **field_definitions
452-
).model_json_schema()
450+
model_cls = create_model("FieldDefinitions", **field_definitions) # type: ignore[call-overload]
451+
json_schema = model_cls.model_json_schema()
453452
json_schema.pop("title") # Remove the throwaway model name
454453
if "required" not in json_schema:
455454
# The API schema doesn't require this, and gpt-3.5-turbo doesn't

0 commit comments

Comments
 (0)