-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
limit docstrings and comments to 79 characters (#207)
This project has followed the following convention from the start: - code limited to 88 characters (Black code style) - Docstrings and comments limited to 79 characters. Enforce this by adding the rule W505 for ruff. Thoughts -------- Although the *exact* numbers (79 and 88) could also be something else and still offer a good developer (and code reading) experience, those numbers are pretty close to optimal. The reason for this is that I, among many others develop on small screen (laptop). I also use a large font / small resolution (which makes font larger) to make it easier for my eyes. As it's pretty common to need to have code side by side, the roughly 88 characters starts to be absolute maximum so one does not need to do horizontal scrolling. There must be some reason people like to have shorter docstrings than the actual code. - PEP8: 72 for comments, 79 for code - Django code style: 79 for comments, 88 for code. Could perhaps some day use same line length for code and comments, but even with the 79 char limit the experience has been quite good and the code looks easy to read in my opinion. Refs: https://peps.python.org/pep-0008/ https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style
- Loading branch information
Showing
6 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters