Skip to content

chore(internal): fix some typos #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/openai/_utils/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Params(TypedDict, total=False):
return cast(_T, transformed)


def _get_annoted_type(type_: type) -> type | None:
def _get_annotated_type(type_: type) -> type | None:
"""If the given type is an `Annotated` type then it is returned, if not `None` is returned.

This also unwraps the type when applicable, e.g. `Required[Annotated[T, ...]]`
Expand All @@ -115,7 +115,7 @@ def _maybe_transform_key(key: str, type_: type) -> str:

Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata.
"""
annotated_type = _get_annoted_type(type_)
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
# no `Annotated` definition for this type, no transformation needed
return key
Expand Down Expand Up @@ -174,7 +174,7 @@ def _transform_recursive(


def _transform_value(data: object, type_: type) -> object:
annotated_type = _get_annoted_type(type_)
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
return data

Expand Down
2 changes: 1 addition & 1 deletion tests/test_extract_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_multiple_files() -> None:
[],
],
],
ids=["dict expecting array", "arraye expecting dict", "unknown keys"],
ids=["dict expecting array", "array expecting dict", "unknown keys"],
)
def test_ignores_incorrect_paths(
query: dict[str, object],
Expand Down