diff --git a/.flake8 b/.flake8 index c4094af462..bd5e70e828 100644 --- a/.flake8 +++ b/.flake8 @@ -2,6 +2,7 @@ exclude = build,.git,.tox,./tests/.env extend-ignore = E203 max-line-length = 88 +max-doc-length = 79 per-file-ignores = django/core/cache/backends/filebased.py:W601 django/core/cache/backends/base.py:W601 diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt index c7502985b6..656ce0abd5 100644 --- a/docs/internals/contributing/writing-code/coding-style.txt +++ b/docs/internals/contributing/writing-code/coding-style.txt @@ -52,12 +52,10 @@ Python style that :pep:`8` is only a guide, so respect the style of the surrounding code as a primary goal. - An exception to :pep:`8` is our rules on line lengths. Don't limit lines of - code to 79 characters if it means the code looks significantly uglier or is - harder to read. We allow up to 88 characters as this is the line length used - by ``black``. This check is included when you run ``flake8``. Documentation, - comments, and docstrings should be wrapped at 79 characters, even though - :pep:`8` suggests 72. + An exception to :pep:`8` is our rules on line lengths. We allow up to 88 + characters in code, as this is the line length used by ``black``. + Documentation, comments, and docstrings should be wrapped at 79 characters. + These limits are checked when ``flake8`` is run. * String variable interpolation may use :py:ref:`%-formatting `, :py:ref:`f-strings