From f17ab57b6460a870111464684475a6b68080dba8 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 11 Feb 2021 22:13:07 +0900 Subject: [PATCH] Fix #8860: doc: recipe directive crashes with AttributeError The pre check in the `ReceipeDirective.add_target_and_index() was wrong. It checkes non-existing option "noindex", but it should check "contains" option instead. --- doc/development/tutorials/examples/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/development/tutorials/examples/recipe.py b/doc/development/tutorials/examples/recipe.py index c7317578b..1c3389847 100644 --- a/doc/development/tutorials/examples/recipe.py +++ b/doc/development/tutorials/examples/recipe.py @@ -24,7 +24,7 @@ class RecipeDirective(ObjectDescription): def add_target_and_index(self, name_cls, sig, signode): signode['ids'].append('recipe' + '-' + sig) - if 'noindex' not in self.options: + if 'contains' not in self.options: ingredients = [ x.strip() for x in self.options.get('contains').split(',')]