This is how I do it for PyCharm Community Edition 2018.1 on osx.

PyCharm -> Preferences -> Editor -> Code Style -> Visual guides

I set it to 79 chars.

Screen Shot 2018-05-17 at 12.35.28 PM copy

Ref: https://stackoverflow.com/questions/17319422/how-do-i-set-the-maximum-line-length-in-pycharm https://stackoverflow.com/questions/15438326/python-pep-8-docstring-line-length