[Python-projects] PyLint results
paul at alanweberassociates.com
paul at alanweberassociates.com
Mon Aug 23 06:24:22 CEST 2004
Just ran PyLint on my pyparsing code - woe is me!
Here are some comments:
W: 29: Line too long (1409/80)
Actually, this line is defined using a """'ed string. The string is probably about 1400 characters long, but I assure you it is broken up across multiple lines!
W371 - Many complaints about my variable names, using mixed lower and upper case (also known as "camel case") - PyLint really shouldn't complain about variable and method names such as "setName", "setDebug", etc. but the regexp used to test the names does not allow capital letters. I modified base.py to use the following regexps:
FUNC_NAME_RGX = re.compile('[a-z_][a-zA-Z0-9_]*$')
METH_NAME_RGX = re.compile('[a-z_][a-zA-Z0-9_]*$')
VAR_NAME_RGX = re.compile('[a-z_][a-zA-Z0-9_]*$')
E: 96:ParseException.__str__: Access to undefined member 'column'
'column' is actually a pseudo-attribute, handled in a custom __getattr__ method. Not sure how you would test for this, but it isn't really an error in my code.
Overall, I got a 6.90 score. Too many complaints for not leaving spaces after my commas, I guess...
Thanks for a nice tool.
-- Paul McGuire
More information about the Python-Projects
mailing list