class ClassA(): def __init__(self): pass def methodA(self, parameter1 = "") pass class ClassB(ClassA): def methodB(self): pass
I want to:
1. Count the components (there are two in this file: ClassA and ClassB)
2. Count the number of methods in each component
3. Count the number of lines in each component
This would result in this output:
Does anyone have any recommendations on how to go about doing this? Can I determine what each line is by counting the whitespace at the beginning of each line? Components should all be left justified (no whitespace), methods would have 4 spaces, and lines would have +4?