[code-quality] Fwd: The doc demo have some problems

2014-11-21 Thread Skip Montanaro
The appended email crossed the transom at [email protected] today. Apologies for the hot mess Gmail makes of forwarded emails. I wonder if it makes sense to warn about misspelled dunder names. I tried pylinting (1.1.0, sorry, it's what I have here at work) and flake8ing (2.0) this: class Foo(o

[code-quality] Advice regarding caching values as a side-effect of visiting classes

2014-11-21 Thread Anne Mulhern
Hi! I've implemented a very simple analysis of the kind described in this enhancement request: https://bitbucket.org/logilab/pylint/issue/201/pointless-attribute-override-checker. The analysis is neither sound nor complete, but has proven useful for removing of bits of dead code. It can be mad

Re: [code-quality] How to detect unused PyLint declarations

2014-11-21 Thread Anne Mulhern
- Original Message - > From: "Kay Hayen" > To: [email protected] > Sent: Wednesday, October 29, 2014 10:00:15 AM > Subject: [code-quality] How to detect unused PyLint declarations > > > Hello, > > I have coding rules that require me to annotate exceptions to rules > for PyLint

Re: [code-quality] How to detect unused PyLint declarations

2014-11-21 Thread Torsten Marek
Yes, I0021 is useless-suppression. There's also suppressed-message, to show what kinds of messages have been suppressed. Looking at that every once in a while is interesting as well. Especially for badly understood messages, there is a tendency in developers to just paper over the warnings instead

Re: [code-quality] Advice regarding caching values as a side-effect of visiting classes

2014-11-21 Thread Torsten Marek
Hi Anne, you can write a checker that simply stores all classes it encounters and then walks the inheritance tree to find all violations in `close`. This checker method is called after all modules specified on the commandline have been checked, but before reports are generated, so emitting warning