Search code examples
pycharmdocstringtodo

How to let PyCharm find Todo items in docstrings?


I was just playing around with PyCharms TODO finder. It is a nice feature and I would like to use it more intense. However it doesn't find any todo entries that I use in my docstrings.

"""
Do something.

:todo: This is my Todo-Item that is sadly not found

"""
# Todo: When I use line comments it is found.
def my_function():
    pass

Is there a way to configure PyCharm to find todo items in docstrings?


Solution

  • If I got it right PyCharm makes a difference between comments like

    # Comment
    

    and docstrings like

    """
    My function does this and that.
    
    """
    

    TODO entries are only looked for in comments. So

    """
    My function does this and that.
    
    todo: add something else
    
    """
    

    wont work.