Skip to content

Commit

Permalink
Fix typos (#8356)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Dec 12, 2023
1 parent 68df4af commit ab4d107
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
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

0 comments on commit ab4d107

Please sign in to comment.