Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Pycharm have Docstring Conventions checks (PEP 257)?

Tags:

python

pycharm

I am new using Pycharm and I was not able to find anything that refers to PEP 257 checks in code. I have been using Atom with its specific packages to work with Python and it has managed PEP 257 checks very well. Because of that I would be surprised if a non cheap IDE did not have this feature.

Thanks!

like image 935
Abend Avatar asked Jul 31 '17 14:07

Abend


2 Answers

As noted above, PEP257 is not implemented in PyCharm. If it's important to you, I suggest voting for it in the link @Michal found. PyCharm developers definitely listen to the community. 4 people voting for it in 3 years doesn't really put it as high priority though.

However, if you want to be able to call this from within PyCharm, you could install pydocstyle, and call it from inside of PyCharm using Settings | Tools | External Tools. This wont give you things highlighted as warnings, but will give you the check you are requesting.

like image 133
nanotek Avatar answered Sep 30 '22 14:09

nanotek


I looked through the PyCharm plugins repository and settings and it seems, that it doesn't yet check PEP 257, nor adequate plugin exists. Currently, only PEP 8 is checked.

You can check what is inspected in Settings>Editor>Inspections

Edit: I found this functionality has been requested already on May 2014, so I believe it won't be long now. https://youtrack.jetbrains.net/issue/PY-12553

like image 41
Michal Polovka Avatar answered Sep 30 '22 14:09

Michal Polovka