Slaverebooter should honor pep8 and where-applicable pylint

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
3 years ago
14 days ago

People

(Reporter: Callek, Assigned: Callek)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8471278 [details] [diff] [review]
[tools] v1

pylint and pep8 have some valid concerns with slaverebooter, this patch fixes them.


BEFORE:
$ pylint --rcfile=/c/Users/Justin/pylintrc buildfarm/maintenance/reboot-idle-slaves.py
************* Module reboot-idle-slaves
W: 96, 4: No exception type(s) specified (bare-except)
W: 52,12: Specify string format arguments as logging function parameters (logging-not-lazy)
W: 97,64: Using possibly undefined loop variable 'slave' (undefined-loop-variable)

$ pep8 --config /c/Users/Justin/pep8rc buildfarm/maintenance/reboot-idle-slaves.py
buildfarm/maintenance/reboot-idle-slaves.py:32:1: E302 expected 2 blank lines, found 1
buildfarm/maintenance/reboot-idle-slaves.py:40:1: E302 expected 2 blank lines, found 1
buildfarm/maintenance/reboot-idle-slaves.py:45:1: E302 expected 2 blank lines, found 1
buildfarm/maintenance/reboot-idle-slaves.py:48:1: E302 expected 2 blank lines, found 1

(my pylintrc is very similar to that of relengapi, and pep8rc just specifies max-line-length as 100)


AFTER:
No Pep8 errors and:

$ pylint --rcfile=/c/Users/Justin/pylintrc buildfarm/maintenance/reboot-idle-slaves.py
************* Module reboot-idle-slaves
W:104, 4: No exception type(s) specified (bare-except)
Attachment #8471278 - Flags: review?(coop)

Updated

3 years ago
Attachment #8471278 - Flags: review?(coop) → review+
(Assignee)

Comment 1

3 years ago
http://hg.mozilla.org/build/tools/rev/a0e97dca90a3
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Component: Tools → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.