From 5b9da9ea5be7cf68bc5c3baa6757f5ceea5e6c31 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sun, 9 Jan 2022 21:25:52 -0500 Subject: [PATCH] Update cross links between Aggregate, Selector, and FactoryAggregate docs --- docs/providers/aggregate.rst | 14 +++++++------- docs/providers/factory.rst | 4 ++++ docs/providers/selector.rst | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/providers/aggregate.rst b/docs/providers/aggregate.rst index b09c74a8..16cec4ce 100644 --- a/docs/providers/aggregate.rst +++ b/docs/providers/aggregate.rst @@ -58,14 +58,14 @@ To use non-string keys or string keys with ``.`` and ``-``, provide a dictionary "key-with-dashes": providers.Factory(...), }) -``Aggregate`` provider is a successor of :ref:`factory-aggregate-provider` provider. ``Aggregate`` provider doesn't have -a restriction on the provider type, while ``FactoryAggregate`` can aggregate only ``Factory`` providers. - -``Aggregate`` provider is different from the :ref:`selector-provider`. ``Aggregate`` provider doesn't select which provider -to inject and doesn't have a selector. It is always injected "as is". The rest of the interface of both providers is similar. - - +.. seealso:: + :ref:`selector-provider` to inject selected provider based on a configuration value or other callable. + ``Aggregate`` provider is different from the :ref:`selector-provider`. ``Aggregate`` provider doesn't select which provider + to inject and doesn't have a selector. It is always injected "as is". The rest of the interface of both providers is similar. +.. note:: + ``Aggregate`` provider is a successor of :ref:`factory-aggregate-provider` provider. ``Aggregate`` provider doesn't have + a restriction on the provider type, while ``FactoryAggregate`` can aggregate only ``Factory`` providers. .. disqus:: diff --git a/docs/providers/factory.rst b/docs/providers/factory.rst index c16341de..e20d627f 100644 --- a/docs/providers/factory.rst +++ b/docs/providers/factory.rst @@ -152,6 +152,10 @@ Factory aggregate :py:class:`FactoryAggregate` provider aggregates multiple factories. +.. seealso:: + :ref:`aggregate-provider` – it's a successor of ``FactoryAggregate`` provider that can aggregate + any type of provider, not only ``Factory``. + The aggregated factories are associated with the string keys. When you call the ``FactoryAggregate`` you have to provide one of the these keys as a first argument. ``FactoryAggregate`` looks for the factory with a matching key and calls it with the rest of the arguments. diff --git a/docs/providers/selector.rst b/docs/providers/selector.rst index db3a8be3..e28c2fc1 100644 --- a/docs/providers/selector.rst +++ b/docs/providers/selector.rst @@ -30,4 +30,7 @@ When a ``Selector`` provider is called, it gets a ``selector`` value and delegat the provider with a matching name. The ``selector`` callable works as a switch: when the returned value is changed the ``Selector`` provider will delegate the work to another provider. +.. seealso:: + :ref:`aggregate-provider` to work with a group of providers. + .. disqus::