guyzmo/buildstrap

View on GitHub

Showing 7 of 7 total issues

File buildstrap.py has 379 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python

'''
Buildstrap: generate and run buildout in your projects ::

Severity: Minor
Found in buildstrap/buildstrap.py - About 5 hrs to fix

    Function build_parts has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def build_parts(packages, requirements, part_templates=[], interpreter=None, 
    Severity: Major
    Found in buildstrap/buildstrap.py - About 1 hr to fix

      Function list_part_templates has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def list_part_templates(config_path):
          '''Iterates over the available part templates
      
          Will get through both package's templates path and user config path to
          check for ``.part.cfg`` files.
      Severity: Minor
      Found in buildstrap/buildstrap.py - About 45 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

      Function build_part_template has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def build_part_template(name, config_path):
          '''Creates a part out of a template file
      
          Will resolve a part file based on its name, by looking through both package's
          static directory, and through user defined configuration path.
      Severity: Minor
      Found in buildstrap/buildstrap.py - About 35 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

      Function build_parts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def build_parts(packages, requirements, part_templates=[], interpreter=None, 
              config_path=None, root_path='.', src_path=None, env_path=None, bin_path=None):
          '''Builds up the different parts of the buildout configuration
      
          this is the workhorse of this code. It will build and return an internal
      Severity: Minor
      Found in buildstrap/buildstrap.py - About 35 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

      Function buildstrap has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def buildstrap(args):
          '''Parses the command line arguments, build the parts, generate the config and runs buildout
      
          refer to the __doc__ of this module for all arguments.
      
      
      Severity: Minor
      Found in buildstrap/buildstrap.py - About 35 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

      Function build_part_buildout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      def build_part_buildout(root_path=None, src_path=None, env_path=None, bin_path=None):
          '''Generates the buildout part
      
          This part is the entry point of a buildout configuration file, setting up
          general values for the environment. Here we setup paths and defaults for
      Severity: Minor
      Found in buildstrap/buildstrap.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

      Severity
      Category
      Status
      Source
      Language