Skip to content

Commit

Permalink
Fix some typos (repeated words and it's/its) (#7063)
Browse files Browse the repository at this point in the history
  • Loading branch information
eumiro committed Aug 9, 2023
1 parent de85154 commit fac0957
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/errors/usage_errors.md
Expand Up @@ -903,7 +903,7 @@ except PydanticUserError as exc_info:
## `config` is unused with TypeAdapter {#type-adapter-config-unused}

You will get this error if you try to pass `config` to `TypeAdapter` when the type is a type that
has it's own config that cannot be overridden (currently this is only `BaseModel`, `TypedDict` and `dataclass`):
has its own config that cannot be overridden (currently this is only `BaseModel`, `TypedDict` and `dataclass`):

```py
from typing_extensions import TypedDict
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/mypy.md
Expand Up @@ -58,7 +58,7 @@ mypy \

### Strict Optional

For your code to pass with `--strict-optional`, you need to to use `Optional[]` or an alias of `Optional[]`
For your code to pass with `--strict-optional`, you need to use `Optional[]` or an alias of `Optional[]`
for all fields with `None` as the default. (This is standard with mypy.)

### Other Pydantic interfaces
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/visual_studio_code.md
Expand Up @@ -164,7 +164,7 @@ that way Pylance and mypy will ignore errors in that line.

#### Override the type of a variable

You can also create a variable with the value you want to use and declare it's type explicitly with `Any`.
You can also create a variable with the value you want to use and declare its type explicitly with `Any`.

```Python hl_lines="1 11-12"
from typing import Any
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/model_config.md
Expand Up @@ -244,7 +244,7 @@ print(user)
#> name='John Doe'
```

1. This is the the default behaviour.
1. This is the default behaviour.
2. The `age` argument is ignored.

Instead, with `extra='allow'`, the `age` argument is included:
Expand Down
2 changes: 1 addition & 1 deletion pydantic/_internal/_annotated_handlers.py
Expand Up @@ -83,7 +83,7 @@ def generate_schema(self, __source_type: Any) -> core_schema.CoreSchema:
Use this function if e.g. you are handling schema generation for a sequence
and want to generate a schema for its items.
Otherwise, you may end up doing something like applying a `min_length` constraint
that was intended for the sequence itself to it's items!
that was intended for the sequence itself to its items!
Args:
__source_type: The input type.
Expand Down
2 changes: 1 addition & 1 deletion pydantic/_internal/_fields.py
Expand Up @@ -32,7 +32,7 @@ def get_type_hints_infer_globalns(
global namespace from `obj.__module__` if it is not `None`.
Args:
obj: The object to get it's type hints.
obj: The object to get its type hints.
localns: The local namespaces.
include_extras: Whether to recursively include annotation metadata.
Expand Down
2 changes: 1 addition & 1 deletion pydantic/_internal/_generate_schema.py
Expand Up @@ -1964,7 +1964,7 @@ def _extract_get_pydantic_json_schema(tp: Any, schema: CoreSchema) -> GetJsonSch
code='custom-json-schema',
)

# handle GenericAlias' but ignore Annotated which "lies" about it's origin (in this case it would be `int`)
# handle GenericAlias' but ignore Annotated which "lies" about its origin (in this case it would be `int`)
if hasattr(tp, '__origin__') and not isinstance(tp, type(Annotated[int, 'placeholder'])):
return _extract_get_pydantic_json_schema(tp.__origin__, schema)

Expand Down
2 changes: 1 addition & 1 deletion pydantic/v1/datetime_parse.py
Expand Up @@ -147,7 +147,7 @@ def parse_time(value: Union[time, StrBytesIntFloat]) -> time:
number = get_numeric(value, 'time')
if number is not None:
if number >= 86400:
# doesn't make sense since the time time loop back around to 0
# doesn't make sense since the time loop back around to 0
raise errors.TimeError()
return (datetime.min + timedelta(seconds=number)).time()

Expand Down
2 changes: 1 addition & 1 deletion pydantic/v1/fields.py
Expand Up @@ -263,7 +263,7 @@ def Field(
Takes same values as the ``include`` and ``exclude`` arguments on the ``.dict`` method.
:param include: include this field while dumping.
Takes same values as the ``include`` and ``exclude`` arguments on the ``.dict`` method.
:param const: this field is required and *must* take it's default value
:param const: this field is required and *must* take its default value
:param gt: only applies to numbers, requires the field to be "greater than". The schema
will have an ``exclusiveMinimum`` validation keyword
:param ge: only applies to numbers, requires the field to be "greater than or equal to". The
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -118,7 +118,7 @@ memray = [
]

[tool.pdm.resolution.overrides]
# requires Python > 3.8, we only test with 3.8 in CI but because of it it won't lock properly
# requires Python > 3.8, we only test with 3.8 in CI but because of it won't lock properly
pytest-memray = "1.4.0"

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_json.py
Expand Up @@ -449,7 +449,7 @@ class Model(BaseModel):

def test_json_encoders_on_model() -> None:
"""Make sure that applying json_encoders to a BaseModel
does not edit it's schema in place.
does not edit its schema in place.
"""

class Model(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_root_model.py
Expand Up @@ -45,7 +45,7 @@ class InnerModel(BaseModel):

def check_schema(schema: CoreSchema) -> None:
# we assume the shape of the core schema here, which is not a guarantee
# pydantic makes to it's users but is useful to check here to make sure
# pydantic makes to its users but is useful to check here to make sure
# we are doing the right thing internally
assert schema['type'] == 'definitions'
inner = schema['schema']
Expand Down

0 comments on commit fac0957

Please sign in to comment.