Skip to content
Open
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
4 changes: 2 additions & 2 deletions docs/customizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ Using the `omit` override will simply skip the attribute completely when generat

By default, the generators will determine the right un/structure hook for each attribute of a class at time of generation according to the type of each individual attribute.

This process can be overriden by passing in the desired un/structure hook manually.
This process can be overridden by passing in the desired un/structure hook manually.

```{doctest}

Expand Down Expand Up @@ -436,7 +436,7 @@ ExampleClass(klass=1)
```

These customizations are automatically recognized by every {class}`Converter <cattrs.Converter>`.
They can still be overriden explicitly, see [](#custom-un-structuring-hooks).
They can still be overridden explicitly, see [](#custom-un-structuring-hooks).

```{attention}
One of the fundamental [design decisions](why.md#design-decisions) of _cattrs_ is that serialization rules should be separate from the models themselves;
Expand Down
10 changes: 5 additions & 5 deletions docs/defaulthooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ValueError: invalid literal for int() with base 10: 'not-an-int'
```

Coercion is performed for performance and compatibility reasons.
Any of these hooks can be overriden if pure validation is required instead.
Any of these hooks can be overridden if pure validation is required instead.

```{doctest}
>>> c = Converter()
Expand Down Expand Up @@ -270,7 +270,7 @@ _cattrs_ will be able to structure it by default.
Homogeneous and heterogeneous tuples can be structured from iterable objects.
Heterogeneous tuples require an iterable with the number of elements matching the number of type parameters exactly.

Heterogenous tuples use:
Heterogeneous tuples use:

- `typing.Tuple[A, B, C, D]`
- `tuple[A, B, C, D]`
Expand All @@ -297,7 +297,7 @@ When unstructuring, heterogeneous tuples unstructure into tuples since it's fast
```

```{note}
Structuring heterogenous tuples are not supported by the BaseConverter.
Structuring heterogeneous tuples are not supported by the BaseConverter.
```

```{versionchanged} 25.2.0
Expand Down Expand Up @@ -680,7 +680,7 @@ Additionally, `typing.Annotated` types containing `cattrs.override()` are recogn
### Type Aliases

[Type aliases](https://docs.python.org/3/library/typing.html#type-aliases) are supported on Python 3.12+ and are handled according to the rules for their underlying type.
Their hooks can also be overriden using [](customizing.md#predicate-hooks).
Their hooks can also be overridden using [](customizing.md#predicate-hooks).

```{warning}
Type aliases using [`typing.TypeAlias`](https://docs.python.org/3/library/typing.html#typing.TypeAlias) aren't supported since there is no way at runtime to distinguish them from their underlying types.
Expand Down Expand Up @@ -717,7 +717,7 @@ datetime.datetime(2022, 1, 1, 0, 0)
### `typing.NewType`

[NewTypes](https://docs.python.org/3/library/typing.html#newtype) are supported and are handled according to the rules for their underlying type.
Their hooks can also be overriden using {meth}`Converter.register_structure_hook() <cattrs.BaseConverter.register_structure_hook>`.
Their hooks can also be overridden using {meth}`Converter.register_structure_hook() <cattrs.BaseConverter.register_structure_hook>`.

```{doctest}

Expand Down
2 changes: 1 addition & 1 deletion docs/strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A(a=1)
```

By default, the tag field name is `_type` and the tag value is the class name of the union member.
Both the field name and value can be overriden.
Both the field name and value can be overridden.

The `tag_generator` parameter is a one-argument callable that will be called with every member of the union to generate a mapping of tag values to union members.
Here are some common `tag_generator` uses:
Expand Down