From: Neal N. <nno...@gm...> - 2005-12-12 02:40:54
|
On 12/9/05, Kenneth Pronovici <ken...@ce...> wrote= : > > > However, running pychecker against examples 6 and 7 does not yield these > same warnings. It is almost as if, because the class is nested, > pychecker ignores it. This is quite probably what the problem is. > It looks to me like the current code does not really support nested > classes. For instance, the only place _findClassWarnings() is called is > for classes defined at the module level. In at least one place, > _handleNestedCode(), it looks like nested classes are explicitly > excluded from being analyzed. However, I will admit that I don't > completely understand what is going on, so I might have missed > something. Your analysis/understaning seems correct. > Does any of this surprise you? Would you have expected nested classes > to be handled properly? Do you have any thoughts on how these bugs can > be fixed? Sadly, no it doesn't suprise me. I didn't design any nesting at the beginning. All nested support was added later. I think the nested support isn't too bad at this point. It hopefully shouldn't be too difficult to fix. All the nested code variables would need to be kept and processed after finishing the outer class/function. Nested functions are already stored. It would probably only require adding nested classes to the list for those nested in functions. You would have to do similar processing for classes (ie, keep track of all the nested classes and after processing the outer class, process all the inner classes). n |