From 5c10415e19a7ea468e4d8d083dd646d12a311717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Go=C5=82da?= Date: Thu, 30 Mar 2023 00:07:45 +0200 Subject: [PATCH] fix documentation for custom strategies --- docs/guide.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide.rst b/docs/guide.rst index a13bb01..b7ec2ef 100644 --- a/docs/guide.rst +++ b/docs/guide.rst @@ -80,7 +80,7 @@ Custom Strategies Strategies are functions that satisfy the following properties: * have the function signature (config, path, base, nxt) -* return the merged object, or None. +* return the merged object, or `deepmerge.STRATEGY_END`. Example: @@ -92,7 +92,7 @@ Example: base.append(nxt[-1]) return base -If a strategy fails, an exception should not be raised. This is to +If a strategy fails, an exception should not be raised, instead it should return `deepmerge.STRATEGY_END`. This is to ensure it can be chained with other strategies, or the fall-back. Uniqueness of elements when merging @@ -104,4 +104,4 @@ types, this includes structures that are not hashable such as dictionaries. In those cases, built-in deepmerge strategies will call repr() -on the object and hash that value instead. \ No newline at end of file +on the object and hash that value instead.