From f9784640cecd620c2290a80030a7c4ad0f450e1b Mon Sep 17 00:00:00 2001 From: Sean Stewart Date: Sun, 7 Jul 2024 10:24:54 -0400 Subject: [PATCH] docs: fix a few refs in docstrings --- src/typelib/graph.py | 6 +++--- src/typelib/marshal/api.py | 2 +- src/typelib/unmarshal/routines.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/typelib/graph.py b/src/typelib/graph.py index e2185ee..52d71b3 100644 --- a/src/typelib/graph.py +++ b/src/typelib/graph.py @@ -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. @@ -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__ diff --git a/src/typelib/marshal/api.py b/src/typelib/marshal/api.py index b854915..6a337e7 100644 --- a/src/typelib/marshal/api.py +++ b/src/typelib/marshal/api.py @@ -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. diff --git a/src/typelib/unmarshal/routines.py b/src/typelib/unmarshal/routines.py index b3cd826..4c6d92f 100644 --- a/src/typelib/unmarshal/routines.py +++ b/src/typelib/unmarshal/routines.py @@ -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