From 8258ca153cafb9499956e8c23fc9353f066e69d1 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Dec 2026 11:42:59 +0000 Subject: [PATCH] docs: fix typos (overriden, heterogenous) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0137jz1XbSeuomn8S7nSE9k6 --- docs/customizing.md | 4 ++-- docs/defaulthooks.md | 10 +++++----- docs/strategies.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/customizing.md b/docs/customizing.md index 0f28283e..df1ba4d5 100644 --- a/docs/customizing.md +++ b/docs/customizing.md @@ -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} @@ -436,7 +436,7 @@ ExampleClass(klass=1) ``` These customizations are automatically recognized by every {class}`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; diff --git a/docs/defaulthooks.md b/docs/defaulthooks.md index 59c05ab1..ac87f95d 100644 --- a/docs/defaulthooks.md +++ b/docs/defaulthooks.md @@ -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() @@ -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]` @@ -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 @@ -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. @@ -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() `. +Their hooks can also be overridden using {meth}`Converter.register_structure_hook() `. ```{doctest} diff --git a/docs/strategies.md b/docs/strategies.md index 7ed68afb..56a5285c 100644 --- a/docs/strategies.md +++ b/docs/strategies.md @@ -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: