microsoft / lisa

LISA is developed and maintained by Microsoft, to empower Linux validation.
https://aka.ms/lisa
MIT License
204 stars 173 forks source link

Reduce code complexity in flake file #1423

Open dsrivastavv opened 3 years ago

dsrivastavv commented 3 years ago

Reduce code complexity to improve code quality. It's currently set to 15 in flake8 config file.

dsrivastavv commented 3 years ago

If reduced to 10, the following errors need to be fixed :

.\lisa\runner.py:235:5: C901 'RootRunner._start_loop' is too complex (15)
.\lisa\search_space.py:97:5: C901 'IntRange.check' is too complex (12)
.\lisa\search_space.py:299:1: C901 'check_countspace' is too complex (13)
.\lisa\runners\legacy_runner.py:629:1: C901 '_track_progress' is too complex (13)
.\lisa\sut_orchestrator\azure\platform_.py:601:5: C901 'AzurePlatform._get_environment_information' is too complex (15)
.\lisa\sut_orchestrator\azure\platform_.py:728:5: C901 'AzurePlatform._get_location_info' is too complex (11)
.\lisa\sut_orchestrator\azure\platform_.py:809:5: C901 'AzurePlatform._create_deployment_parameters' is too complex (15)
.\lisa\sut_orchestrator\azure\platform_.py:1183:5: C901 'AzurePlatform._resource_sku_to_capability' is too complex (11)
.\lisa\tools\reboot.py:50:5: C901 'Reboot.reboot' is too complex (12)
.\lisa\util\process.py:63:5: C901 'Process.start' is too complex (12)
.\lisa\util\process.py:144:5: C901 'Process.wait_result' is too complex (13)