Miserlou / JonesComplexity

Per-line complexity for Flake8
29 stars 4 forks source link

Annotations are increasing complexity #31

Closed sobolevn closed 6 years ago

sobolevn commented 6 years ago

@Miserlou this example show that annotations increase complexity of the line: https://github.com/Miserlou/JonesComplexity/blob/master/tests/fixtures/annotations.py

Here's the test for this fixture: https://github.com/Miserlou/JonesComplexity/blob/master/tests/fixtures/annotations.py

Should we consider it as a bug or a feature?

Miserlou commented 6 years ago

That's actually really interesting, I didn't know about that feature. I personally don't actually like the way they were implemented in Python3, but that's not really the point. They're not a computation, and shouldn't add to the complexity score.