You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deploy_plugins() function in deploy_plugins.py is failing pylint check on:
scripts/plugins/deploy_plugins.py:24:0: R0914: Too many local variables (36/15) (too-many-locals)
scripts/plugins/deploy_plugins.py:24:0: R0912: Too many branches (19/12) (too-many-branches)
scripts/plugins/deploy_plugins.py:24:0: R0915: Too many statements (104/50) (too-many-statements)
The function has more than 250+ lines and pylint with multiple warnings is a great indicator that it needs to be restructured and divided into smaller logical pieces. For instance:
Extract it into a new Plugin class perhaps with another layer PluginDeployer (note: PluginInstallerRefactor install_plugins() in install_plugins.py #329 ) with multiple methods, so the interface would be Plugin.deploy() that we can call while iterating over each plugin in the sequence.
Then another class PluginConfig would handle plugin config parsing and processing.
The check is silenced for now, don't forget to unsilence it when the refactoring is done.
The text was updated successfully, but these errors were encountered:
Silence for now, refactor this function in the future.
> R0914: Too many local variables (36/15) (too-many-locals)
> R0912: Too many branches (19/12) (too-many-branches)
> R0915: Too many statements (104/50) (too-many-statements)
See: #328
This is an unfinished refactoring sub-task coming from the Add Pylint as a python static code analyzer #298.
The
deploy_plugins()
function indeploy_plugins.py
is failing pylint check on:The function has more than 250+ lines and pylint with multiple warnings is a great indicator that it needs to be restructured and divided into smaller logical pieces. For instance:
Plugin
class perhaps with another layerPluginDeployer
(note:PluginInstaller
Refactor install_plugins() in install_plugins.py #329 ) with multiple methods, so the interface would bePlugin.deploy()
that we can call while iterating over each plugin in the sequence.PluginConfig
would handle plugin config parsing and processing.The check is silenced for now, don't forget to unsilence it when the refactoring is done.
The text was updated successfully, but these errors were encountered: