Changes committed to git://oss.sgi.com/nathans/pcp.git dev
qa/src/test_pcp.python | 270 ++++++------
src/python/pcp/pmapi.py | 1015 ++++++++++++++++++++++++------------------------
src/python/pcp/pmcc.py | 388 ++++++++----------
3 files changed, 828 insertions(+), 845 deletions(-)
commit fe986d3a83174c91d17e516870fc250f4d1c6c8b
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue Mar 26 20:26:24 2013 +1100
Initial work on pmapi python module pylint cleanup
Some interesting stuff like "Redefining builtin type()
function" in amongst all the usual code-style reports.
Marked pmContext methods @staticmethod where needed.
All line-too-long warnings addressed, bad whitespace,
global variable naming, redefining built-in 'buffer',
redefining built-in 'str', redefining built-in 'format'
all fixed.
Many issues remain, but that'll do for now. pylint
reckons "Your code has been rated at 9.50/10" (started
at 3.67/10 so not too shabby).
Fixed bug in pmprintf wrapper, which tested its result
before calling the wrapped routine.
Fixed bug in pmGetInDom wrapper resulting from a typo
in nameL (NameL) at one point. pmGetInDomArchive had
the same bug.
Removed pmtimevalSleep wrapper, as it was deceptively
not calling the underlying routine, silently dropping
sub-second precision, and just calling sleep. pylint
expains root cause - "access to protected method"; it
looks like double-underscore routines are a no-go.
commit 7ddf5afa3e8455752e6d66e8e2cce3bba70ab031
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue Mar 26 15:59:36 2013 +1100
Make pmcc python module pylint clean
Some interesting stuff like "overriding builtin type()
function" in amongst all the usual code-style reports.
Resolve all wildcard imports back to explicit subsets,
add class-level docstring based on existing comments,
whitespace abuse (offset from LHS, parens, etc), names
for local variables and so on.
|