This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Make Tkinter sources more readable by adding blank lines
Type: enhancement Stage: resolved
Components: Library (Lib), Tkinter Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-10-12 13:42 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9822 merged serhiy.storchaka, 2018-10-12 13:43
Messages (2)
msg327585 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-10-12 13:42
Tkinter sources are old and don't conform PEP 8. Usually we don't reformat existing sources for avoiding problems with backporting and breaking the history of lines. But I think that we can make some refinements in Tkinter sources.

The tkinter module contains a lot of small methods (often just 1 or 2 lines of code), but with large multiline docstrings. Currently methods are not separated by blank lines. As result, the code of the method is visually closer to the header of the following method that to the header of its method.

The proposed patch adds empty lines between methods and double empty lines between class (and removes few redundant empty lines). Most changes are made automatically:

    autopep8 --select E301,E303,E305 --in-place --recursive Lib/tkinter/

and edited after this (added missed empty lines and removed few unwanted changes).

Since it affects only empty lines, it doesn't break the lines history. And I think this will not make backporting more difficult.
msg327594 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-10-12 16:01
New changeset dc0d571b6401527f236b0513f29847e2b9b8a188 by Serhiy Storchaka in branch 'master':
bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79145
2018-10-12 16:02:03serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-10-12 16:01:08serhiy.storchakasetmessages: + msg327594
2018-10-12 13:43:32serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request9199
2018-10-12 13:42:07serhiy.storchakacreate