openpathsampling/openpathsampling-cli

View on GitHub
paths_cli/wizard/plugin_classes.py

Summary

Maintainability
B
4 hrs
Test Coverage

File plugin_classes.py has 351 lines of code (exceeds 250 allowed). Consider refactoring.
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
Severity: Minor
Found in paths_cli/wizard/plugin_classes.py - About 4 hrs to fix

    Function __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
    Invalid

        def __init__(self, name, category, parameters, builder, *,
    Severity: Major
    Found in paths_cli/wizard/plugin_classes.py - About 1 hr to fix

      Function from_proxies has 12 arguments (exceeds 4 allowed). Consider refactoring.
      Invalid

          def from_proxies(cls, name, category, parameters, compiler_plugin, *,
      Severity: Major
      Found in paths_cli/wizard/plugin_classes.py - About 1 hr to fix

        Function __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Invalid

            def __init__(self, name, category, builder, *, prerequisite=None,
        Severity: Major
        Found in paths_cli/wizard/plugin_classes.py - About 1 hr to fix

          Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Invalid

              def __init__(self, name, ask, helper=None, *, intro=None,
          Severity: Major
          Found in paths_cli/wizard/plugin_classes.py - About 1 hr to fix

            Function get_text_from_context has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Wontfix

            def get_text_from_context(name, instance, default, wizard, context, *args,
            Severity: Major
            Found in paths_cli/wizard/plugin_classes.py - About 50 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Invalid

                  def __init__(self, category, *, obj_name=None, store_name=None,
              Severity: Minor
              Found in paths_cli/wizard/plugin_classes.py - About 45 mins to fix

                Function __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Confirmed

                    def __call__(self, help_args, context):
                        """Get help based on user input ``help_args`` and context.
                
                        Parameters
                        ----------
                Severity: Minor
                Found in paths_cli/wizard/plugin_classes.py - About 25 mins to fix

                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"

                Further reading

                There are no issues that match your filters.

                Category
                Status