Skip to content

Commit

Permalink
docs: fix a few refs in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
seandstewart committed Jul 7, 2024
1 parent 6e5542e commit f978464
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/typelib/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def static_order(
multiple times at runtime, which would be wasted effort, as types don't change
at runtime.
To avoid memoization, you can make use of `:py:func:`itertypes`.
To avoid memoization, you can make use of :py:func:`itertypes`.
"""
# We want to leverage the cache if possible, hence the recursive call.
# Shouldn't actually recurse more than once or twice.
Expand Down Expand Up @@ -59,8 +59,8 @@ def itertypes(
We will build a graph of types with the given type `t` as the root node,
then iterate from the outermost leaves back to the root using BFS.
This is computationally expensive, so you are encouraged to use `:py:func:`static_order`
instead of `:py:func:`itertypes`.
This is computationally expensive, so you are encouraged to use :py:func:`static_order`
instead of :py:func:`itertypes`.
"""
if inspection.istypealiastype(t):
t = t.__value__
Expand Down
2 changes: 1 addition & 1 deletion src/typelib/marshal/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def marshal(
value: tp.Any, *, t: type[T] | refs.ForwardRef | str | None = None
) -> serdes.MarshalledValueT:
"""Marshal :py:param:`value` from :py:param:`typ` into `:py:class:~typelib.serdes.MarshalledValueT`.
"""Marshal :py:param:`value` from :py:param:`typ` into :py:class:~typelib.serdes.MarshalledValueT`.
Args:
value: The value to reduce to a simple, encodable type.
Expand Down
2 changes: 1 addition & 1 deletion src/typelib/unmarshal/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def __call__(self, val: tp.Any) -> T:


class LiteralUnmarshaller(AbstractUnmarshaller[LiteralT], tp.Generic[LiteralT]):
"""Unmarshaller that will enforce an input conform to a defined `:py:class:typing.Literal`.
"""Unmarshaller that will enforce an input conform to a defined :py:class:typing.Literal`.
Notes:
We will attempt to decode the value into a real Python object if the input
Expand Down

0 comments on commit f978464

Please sign in to comment.