Skip to content

Commit 8d1c387

Browse files
[doc] Add a rational for pylint's default value (#10534)
Due to popular demand. PEP8: > Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the line length limit up to 99 characters, provided that comments and docstrings are still wrapped at 72 characters. Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 834dedd commit 8d1c387

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ script/ # Development utility scripts
191191
- `.pre-commit-config.yaml` -- Code quality checks configuration
192192
- `pylintrc` -- Pylint's own configuration
193193
- `requirements_test_min.txt` -- Minimal test dependencies
194+
- `.gitignore` do not add the 'venv' inside the .gitignore, don't commit the venv in the
195+
first place (humans add it to their global gitignore)
194196

195197
## Creating New Checkers
196198

doc/user_guide/configuration/all-options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ Standard Checkers
902902

903903
--max-line-length
904904
"""""""""""""""""
905-
*Maximum number of characters on a single line.*
905+
*Maximum number of characters on a single line. Pylint's default of 100 is based on PEP 8's guidance that teams may choose line lengths up to 99 characters.*
906906

907907
**Default:** ``100``
908908

pylint/checkers/format.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ class FormatChecker(BaseTokenChecker, BaseRawFileChecker):
166166
"default": 100,
167167
"type": "int",
168168
"metavar": "<int>",
169-
"help": "Maximum number of characters on a single line.",
169+
"help": (
170+
"Maximum number of characters on a single line. "
171+
"Pylint's default of 100 is based on PEP 8's guidance that teams "
172+
"may choose line lengths up to 99 characters."
173+
),
170174
},
171175
),
172176
(

0 commit comments

Comments
 (0)