Code complexity analysis on spyder

68 views
Skip to first unread message

Masaki Hiraoka

unread,
Jun 22, 2020, 11:41:49 AM6/22/20
to spyder
Excuse me, please let me know if you know
There is a "linting" item in the Spyder preferences menu, and there is a checkbox for "Enable complexity linting with Mccabe Package".(The figure below)
However, even if this check is turned ON and the linting is executed by pressing the F8 key, the result of the code complexity linting is not displayed.
(linting by pylint is executed and the result is displayed.)
How can I perform a complexity linting and view the results?


spyder_setting.png


Carlos Córdoba

unread,
Jun 22, 2020, 11:48:01 AM6/22/20
to spyd...@googlegroups.com
Hi,

That analysis is shown in real time, not when you press F8. So you just need to write code with too much complexity in the editor and you'll see it reported by Mccabe on the left (i.e. next to line numbers), just like other errors or warnings.


Cheers,
Carlos

El 21/06/20 a las 2:02 a. m., Masaki Hiraoka escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/1c372575-1e16-4d21-a305-850b3b10bfbbo%40googlegroups.com.

Masaki Hiraoka

unread,
Jun 27, 2020, 3:32:54 PM6/27/20
to spyder
Sorry for being late.
Thank you for your reply
I understand that Mccabe's complexity calculation does not work with the F8 key and is displayed in real time.

If you know the addition, please let me know.
For confirmation, I tried to write the code that makes if about 15 layers on spyder, but there is no sign that the complexity is displayed.
Am I missing something?

2020年6月23日火曜日 0時48分01秒 UTC+9 Carlos Córdoba:
Hi,

That analysis is shown in real time, not when you press F8. So you just need to write code with too much complexity in the editor and you'll see it reported by Mccabe on the left (i.e. next to line numbers), just like other errors or warnings.


Cheers,
Carlos

El 21/06/20 a las 2:02 a. m., Masaki Hiraoka escribió:
Excuse me, please let me know if you know
There is a "linting" item in the Spyder preferences menu, and there is a checkbox for "Enable complexity linting with Mccabe Package".(The figure below)
However, even if this check is turned ON and the linting is executed by pressing the F8 key, the result of the code complexity linting is not displayed.
(linting by pylint is executed and the result is displayed.)
How can I perform a complexity linting and view the results?


spyder_setting.png


--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyd...@googlegroups.com.

Carlos Córdoba

unread,
Jun 27, 2020, 3:34:42 PM6/27/20
to spyd...@googlegroups.com
Hi,

Please open an issue about it, along with the code is not giving a complexity warning, here:

https://github.com/spyder-ide/spyder/issues


Cheers,
Carlos

El 27/06/20 a las 8:25 a. m., Masaki Hiraoka escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/d10af83f-d28b-42f8-8640-d309cd3264d3o%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages