On Thu, Feb 10, 2022 at 5:46 PM Joel Holdsworth <jholdsworth@xxxxxxxxxx> wrote: > > This patch set contains multiple patches to improve consistency and > tidyness of the git-p4 script's code style. > > Many of these patches have been driven by the guidlines contained in the > Python PEP8 "Style Guide for Python Code" and were applied using a > mixture of human intervention, and tools including autopep8 and > pycodestyle. > > This patch-set stops short of bringing git-p4 into full PEP8 compliance, > most notably in regard to the following items: > > - There is no patch to apply the recommended column limit of > 79-characters, > - There is no patch to correct hanging indents of multi-line > declarations such as multi-line function delcarations, function > invocations, etc. > I love the direction of cleaning this up and making it compliant with *something* :) I've tried to run pylint on the previous state and state after this patch, but unfortunately there's a *lot* of noise either way - from all the "pylint: disable" entries in the script I have to assume that at some point it was compliant with *some* pylint version, but at the moment it's very far from any sort of compliance with checks I can run (both before and after this patchset). I have a few questions about the changes - I don't think they're specific to any single commit so I'll list them here: 1) Is there a tool that can be used to check for PEP8 compliance, and shows only the two remaining issues you highlighted above? 2) What is the relationship between "git-p4" and "git-p4.py"? Before this patchset they are identical except for the shebang line, after this patchset all these fixes are applied only to one of them. I assume the changes should be made to both files in a coordinated fashion? 3) Which of the "pylint: disable" entries remain meaningful after these changes, if any? I imagine "disable=wrong-import-order" for example makes no sense? I personally have an interest in making sure this script keeps running correctly under python2, so I plan to test this when I can. I imagine this is already accounted for in the t98xx suite somewhere, but I haven't found it. Thanks, Tao