paths_cli/wizard/plugin_classes.py
File plugin_classes.py
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
import textwrap
from paths_cli.plugin_management import OPSPlugin
from paths_cli.wizard.standard_categories import get_category_info
from paths_cli.wizard.load_from_ops import load_from_ops
from paths_cli.wizard.parameters import WizardParameter
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Invalid
Invalid
def __init__(self, name, category, parameters, builder, *,
Function from_proxies
has 12 arguments (exceeds 4 allowed). Consider refactoring. Invalid
Invalid
def from_proxies(cls, name, category, parameters, compiler_plugin, *,
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Invalid
Invalid
def __init__(self, name, category, builder, *, prerequisite=None,
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Invalid
Invalid
def __init__(self, name, ask, helper=None, *, intro=None,
Function get_text_from_context
has 7 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
Wontfix
def get_text_from_context(name, instance, default, wizard, context, *args,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Invalid
Invalid
def __init__(self, category, *, obj_name=None, store_name=None,
Function __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
Confirmed
def __call__(self, help_args, context):
"""Get help based on user input ``help_args`` and context.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"