glances icon indicating copy to clipboard operation
glances copied to clipboard

Reduce code complexity

Open nicolargo opened this issue 1 year ago • 14 comments

Reduce complexity of function higher than 20:

https://scrutinizer-ci.com/g/nicolargo/glances/code-structure/develop?elementType=py-function&orderField=conditional_complexity&order=desc&changesExpanded=0

nicolargo avatar May 26 '24 14:05 nicolargo

Hello @nicolargo, I will take on glances.plugins.system.PluginModel.update(). For us to agree on the expectation; I should follow How to fix, and that's it. Is it right?

ariel-anieli avatar Jul 22 '24 07:07 ariel-anieli

@ariel-anieli yes and all code optimization that look interesting to you .

Thanks !

nicolargo avatar Jul 22 '24 07:07 nicolargo

@ariel-anieli yes and all code optimization that loo, interesting to you .

Thanks !

:slightly_smiling_face: Je t'en prie! I will keep you posted.

ariel-anieli avatar Jul 22 '24 07:07 ariel-anieli

@nicolargo, I will take on glances.plugins.percpu.PluginModel.msg_curse().

ariel-anieli avatar Jul 24 '24 13:07 ariel-anieli

Huge task :) This method is historical...

nicolargo avatar Jul 24 '24 13:07 nicolargo

Huge task :) This method is historical...

:slightly_smiling_face: I'll have a try. Are there caveats worth noticing?

ariel-anieli avatar Jul 24 '24 13:07 ariel-anieli

@nicolargo, I am taking on unittest-core.TestGlances._common_plugin_tests().

ariel-anieli avatar Jul 26 '24 10:07 ariel-anieli

I will tackle _GlancesCurses.__catch_key()

ariel-anieli avatar Jul 27 '24 10:07 ariel-anieli

Current status (2024 oct 26):

Glances 4.1.x score 6.39 Glances 4.2: score 6.63 (thanks to @ariel-anieli)

Next steps:

image

nicolargo avatar Oct 26 '24 15:10 nicolargo