Skip to content
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

Fix typos #8356

Merged
merged 1 commit into from Dec 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydantic/_internal/_generics.py
Expand Up @@ -167,7 +167,7 @@ def _get_caller_frame_info(depth: int = 2) -> tuple[str | None, bool]:
depth: The depth to get the frame.

Returns:
A tuple contains `module_nam` and `called_globally`.
A tuple contains `module_name` and `called_globally`.

Raises:
RuntimeError: If the function is not called inside a function.
Expand Down
2 changes: 1 addition & 1 deletion pydantic/fields.py
Expand Up @@ -927,7 +927,7 @@ def _wrapped_property_is_private(property_: cached_property | property) -> bool:
return wrapped_name.startswith('_') and not wrapped_name.startswith('__')


# this should really be `property[T], cached_proprety[T]` but property is not generic unlike cached_property
# this should really be `property[T], cached_property[T]` but property is not generic unlike cached_property
# See https://github.com/python/typing/issues/985 and linked issues
PropertyT = typing.TypeVar('PropertyT')

Expand Down
2 changes: 1 addition & 1 deletion pydantic/v1/fields.py
Expand Up @@ -817,7 +817,7 @@ def populate_validators(self) -> None:
"""
Prepare self.pre_validators, self.validators, and self.post_validators based on self.type_'s __get_validators__
and class validators. This method should be idempotent, e.g. it should be safe to call multiple times
without mis-configuring the field.
without misconfiguring the field.
"""
self.validate_always = getattr(self.type_, 'validate_always', False) or any(
v.always for v in self.class_validators.values()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Expand Up @@ -1533,7 +1533,7 @@ class Sub(BaseModel):
s4: str = 'v4'

class Parent(BaseModel):
# b will be included since fields are set idependently
# b will be included since fields are set independently
model_config = ConfigDict(fields={'b': {'include': ...}})
a: int
b: int
Expand Down
2 changes: 1 addition & 1 deletion tests/test_types_typeddict.py
Expand Up @@ -735,7 +735,7 @@ class Model(BaseModel):
]


def test_typeddict_inheritence(TypedDict: Any) -> None:
def test_typeddict_inheritance(TypedDict: Any) -> None:
class Parent(TypedDict):
x: int

Expand Down