Python Forum
How to calculate the mccabe complexity in module falke8?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to calculate the mccabe complexity in module falke8?
#1
Right now, i am working on a assignment for a class, which is to calculate the mccabe complexity like it does in module flake8.
And I found that, if a function name appears more than one time, the flake8 module only output once, the last one. Does this reasonable? I think, it should output all of them. So, i want to know why it does not? can anybody explain that?
Reply
#2
I've not used flake8, however it does make sense since in McCabe (Cyclomatic) complexity there is only one result, based on one entry node and one exit node.  If there are multiple 'functions', they are to be broken down to a point of one entry and exit node, then recombined so you end up with one combined function with one entry and exit node.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What is the run time complexity of this code and please explain? samlee916 2 2,306 Nov-06-2020, 02:37 PM
Last Post: deanhystad
  Basic Time Complexity Help Adakip 1 1,841 Aug-25-2019, 09:12 AM
Last Post: ThomasL
  [split] Time Complexity of Counting Mekire 9 7,732 Jan-10-2019, 11:09 AM
Last Post: Gribouillis
  Time complexity of dict vs attributes heras 6 3,790 Aug-24-2018, 10:18 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020