Skip to content

Commit

Permalink
rename mutating_field_name.py to field_renaming.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhPavel committed May 20, 2023
1 parent bcc7bb1 commit b40ff43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/extended_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ it derives implicit parameters based on ``TypeVar`` properties.
- ``Any``
* - ``B = TypeVar('B', bound=Book)``
- ``Book``
* - ``A = TypeVar('A', str, bytes)``
* - ``C = TypeVar('C', str, bytes)``
- ``Union[str, bytes]``


Expand Down Expand Up @@ -71,7 +71,7 @@ Sometimes you have JSON with keys that leave much to be desired.
For example, they might be invalid Python identifiers or just have unclear meanings.
The simplest way to fix it is to use :paramref:`.name_mapping.map` to rename it.

.. literalinclude:: examples/extended_usage/mutating_field_name.py
.. literalinclude:: examples/extended_usage/field_renaming.py

The keys of ``map`` refers to the field name at model definition,
and values contain a new field name.
Expand Down

0 comments on commit b40ff43

Please sign in to comment.