[sos-devel] [PATCH] [last] Fix pep8 issue

Kamalesh Babulal kamalesh at linux.vnet.ibm.com
Fri Jul 10 12:07:56 UTC 2015



On 07/10/2015 05:33 PM, Bryn M. Reeves wrote:
> On Fri, Jul 10, 2015 at 05:28:28PM +0530, Kamalesh Babulal wrote:
>> Fix E126 continuation line over-indented for hanging indent
>> pep8 issue.
>>
>> Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
>> ---
>>  sos/plugins/last.py | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/sos/plugins/last.py b/sos/plugins/last.py
>> index d6b791d..27ba1d3 100644
>> --- a/sos/plugins/last.py
>> +++ b/sos/plugins/last.py
>> @@ -25,9 +25,9 @@ class Last(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
>>      def setup(self):
>>          self.add_cmd_output("last", root_symlink="last")
>>          self.add_cmd_output([
>> -                "last reboot",
>> -                "last shutdown",
>> -                "lastlog"
>> -                ])
>> +            "last reboot",
>> +            "last shutdown",
>> +            "lastlog"
>> +            ])
> To comply with the sos house style for lists this should be:
>
>           self.add_cmd_output([
>  -                "last reboot",
>  -                "last shutdown",
>  -                "lastlog"
>  -                ])
>  +            "last reboot",
>  +            "last shutdown",
>  +            "lastlog"
>  +        ])
>
> But that said, I don't see this warning evern running pep8.py from
> git:
>
> $ cd ~/src/git/pep8/
> $ git pull
> Already up-to-date.
> $ git describe HEAD
> 1.1-533-ga6e423c
> $ cd -
> $ ~/src/git/pep8/pep8.py sos
> $
>
> Which is a bit odd; what pep8 are you running?

Thanks for reviewing the patch. I am running pep8 1.5.6 which is
provided by python-pep8-1.5.6-1 (fedora 20).
It was happy with the patch formatting after changes, I made :(

> Either way - the style is wrong in that file and it should be fixed.
>
> Regards,
> Bryn.
>

-- 
Cheers,
Kamalesh.




More information about the sos-devel mailing list