7👍
PyCharm does not appear to have support for this currently. The active issue for this in JetBrains issue tracker is https://youtrack.jetbrains.com/issue/PY-16760, please consider upvoting it to get it fixed. The only workaround if you want to avoid seeing these "Unresolved reference" errors in your docstrings is to disable the inspection in Preferences > Editor > Inspections > Unresolved references.
Another option that I have tried in the past is removing the "Attributes:" header and writing my attribute documentation on the same indentation level as the rest of the docstring. This no longer gives you a warning, but you are no longer conforming 100% to the Google Docstring Style Guide.
5👍
I solved this issue by adding a ‘# noqa’ after the ‘Attributes:’, because i did not want to disable the unresolved reference warning.
So this would be the final docstring:
"""
Class for posts.
Attributes: # noqa
title(str): Post title.
"""
- Gender problem in a django i18n translation
- Django annotate whether exists or not
- How to ensure a Celery task is Preventing overlapping Celery task executions
- How do I remove a model but keep the database table on Django
0👍
The following works for me: In your docstrings, writing Attribute:
instead of Attributes:
makes the error disappear. That allows you to keep the indentation level
- Django rest framework offline documentation
- Django Rest API: How to get rid of 'UUID' in json when serializing models?
- Django – model unicode() show foreignkey object attribute
- Django One-To-Many Models
- Add object level permission to generic view