PyCQA / pycodestyle

Simple Python style checker in one Python file

Home Page:https://pycodestyle.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are there any guidelines for setting max-line-length?

majurgens opened this issue · comments

Is there a usability study or other research that can be referenced on how to set an effective value for max-line-length? Maybe something that documents the factors to be considered in setting this value?
Perhaps there is some documented reasoning behind the setting of the current default value of 79 characters that helps?

Background:

I am working on a project where they are treating the default max-line-length of 79 characters as a standard that cannot be changed. They appear to think that the default value is based on some magic usability study, some research or something authoritative. So the default value is impacting developers on the project because everyone has modern screens and 79 characters is in the order of only 20% of their available screen width. Having to scroll vertically so much to understand some of the code is possibly the cause of some of the errors and productivity losses that we are seeing being introduced.

from the docs:

pycodestyle (formerly pep8) is a tool to check your Python code against some of the style conventions in PEP 8.

the default value chosen is the one recommended by pep 8 https://github.com/python/peps/blob/main/pep-0008.txt