Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Tutorial: Developing a “recipe” extension #9525

Closed
pya opened this issue Aug 3, 2021 · 0 comments
Closed

Error in Tutorial: Developing a “recipe” extension #9525

pya opened this issue Aug 3, 2021 · 0 comments

Comments

@pya
Copy link

pya commented Aug 3, 2021

Describe the bug

The tutorial example recipe contains an error. Line 27 in recipe.py

        if 'contains' not in self.options:

should be

        if 'contains' in self.options:

i.e. without the not.

Currently, i.e. with the not, no entries in the recipe and ingredient indices are created. Hence the files recipe-ingredient.html and recipe-recipe.html are not generated for the given example. Removing not fixes this and generates these files.

How to Reproduce

Follow the instructions in recipe.

Expected behavior

Recipes and ingredients should be added to their respective indices. As a result, the files recipe-ingredient.html and recipe-recipe.html will be created.

Your project

None, trying the tutorial

Screenshots

No response

OS

independent

Python version

3.9

Sphinx version

3.5.4 (latest at the time)

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@pya pya added the type:bug label Aug 3, 2021
@pya pya changed the title Error in Developing a “recipe” extension Error in Tutorial: Developing a “recipe” extension Aug 3, 2021
tk0miya added a commit that referenced this issue Aug 10, 2021
Fix #9525: tutorial: Wrong condition in recipe.py
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants