flintwork/mccabe — pull request #19 by evvers (2014-05-16 16:01:02+00:00)
Title: Change logic for def inside def complexity

See: https://github.com/flintwork/mccabe/issues/18

Now for code snippet at, for example, ``mega.py``:
```python
class SomeClass(object):
def a(self):
def b(x, y):
if x > y:
print 1
b()

def class_returner():
class SomeClass(object):
def __init__(self):
def a():
if True:
return False
return a()
if True:
return SomeClass

def func():
def junc():
pass
```
execution of command
```
$ python -m mccabe --min 0 mega.py
("2:1: 'SomeClass.a'", 1)
("3:1: 'SomeClass.a.b'", 2)
("12:1: 'class_returner.SomeClass.__init__.a'", 2)
("21:1: 'func.junc'", 1)
("9:1: 'class_returner'", 2)
("20:1: 'func'", 1)
("11:1: 'class_returner.SomeClass.__init__'", 1)
```