pylint

27 views
Skip to first unread message

Bob Pasker

unread,
Dec 28, 2015, 9:09:54 PM12/28/15
to python-twitter
after running into a problem with an uninitialized member variable, I took the liberty of running pylint on api.y

aside from all the PEP8 conformity messages because of spacing, it does report a few legit bugs:

E:1241,10: Undefined variable 'total_count' (undefined-variable)
E:2544, 6: Undefined variable 'parameters' (undefined-variable)
E:2546, 6: Undefined variable 'parameters' (undefined-variable)

W:247, 6: Attribute '_config' defined outside __init__ (attribute-defined-outside-init)
W:261, 4: Attribute '_consumer_secret' defined outside __init__ (attribute-defined-outside-init)
W:260, 4: Attribute '_consumer_key' defined outside __init__ (attribute-defined-outside-init)
W:262, 4: Attribute '_access_token_key' defined outside __init__ (attribute-defined-outside-init)
W:263, 4: Attribute '_access_token_secret' defined outside __init__ (attribute-defined-outside-init)

and a bunch of things which should probably looked at, for example:

W:117,15: Unused argument 'shortner' (unused-argument)
W:688,22: Redefining built-in 'id' (redefined-builtin)
W:3291,22: Redefining name 'urllib' from outer scope (line 30) (redefined-outer-name)

the report is below.

--bob


+-----------------------------------+------------+
|message id                         |occurrences |
+===================================+============+
|bad-indentation                    |1542        |
+-----------------------------------+------------+
|no-member                          |57          |
+-----------------------------------+------------+
|too-many-arguments                 |27          |
+-----------------------------------+------------+
|bad-whitespace                     |23          |
+-----------------------------------+------------+
|bad-continuation                   |20          |
+-----------------------------------+------------+
|unused-argument                    |9           |
+-----------------------------------+------------+
|unidiomatic-typecheck              |9           |
+-----------------------------------+------------+
|too-many-branches                  |8           |
+-----------------------------------+------------+
|redefined-builtin                  |8           |
+-----------------------------------+------------+
|unused-variable                    |5           |
+-----------------------------------+------------+
|attribute-defined-outside-init     |5           |
+-----------------------------------+------------+
|undefined-variable                 |3           |
+-----------------------------------+------------+
|singleton-comparison               |3           |
+-----------------------------------+------------+
|too-many-locals                    |2           |
+-----------------------------------+------------+
|no-self-use                        |2           |
+-----------------------------------+------------+
|wrong-import-order                 |1           |
+-----------------------------------+------------+
|unreachable                        |1           |
+-----------------------------------+------------+
|too-many-public-methods            |1           |
+-----------------------------------+------------+
|too-many-lines                     |1           |
+-----------------------------------+------------+
|too-many-instance-attributes       |1           |
+-----------------------------------+------------+
|redefined-outer-name               |1           |
+-----------------------------------+------------+
|bad-builtin                        |1           |
+-----------------------------------+------------+
|anomalous-unicode-escape-in-string |1           |
+-----------------------------------+------------+

bear

unread,
Dec 28, 2015, 9:26:04 PM12/28/15
to python-...@googlegroups.com
thanks Bob!

working thru the list now.
> --
> You received this message because you are subscribed to the Google Groups
> "python-twitter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-twitte...@googlegroups.com.
> To post to this group, send email to python-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/python-twitter.
> For more options, visit https://groups.google.com/d/optout.



--
Bear

bea...@gmail.com (email)
be...@bear.im (xmpp, email)
http://bear.im

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

bear

unread,
Dec 29, 2015, 5:20:28 AM12/29/15
to python-twitter
All linting issues are now fixed!
Reply all
Reply to author
Forward
0 new messages