JonathonMSmith/growin

View on GitHub
growin/_core.py

Summary

Maintainability
B
4 hrs
Test Coverage

Function get_growth_rates_survey has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def get_growth_rates_survey(start: int, stop: int, clean_level: str,
                            drift_key: str, season_names: list,
                            season_bounds: list, season_days: dict,
                            zone_names: list, zone_bounds: list,
                            zone_lons: dict):
Severity: Minor
Found in growin/_core.py - About 1 hr 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 get_growth_rates_survey has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

def get_growth_rates_survey(start: int, stop: int, clean_level: str,
Severity: Major
Found in growin/_core.py - About 1 hr to fix

    Function get_drifts has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def get_drifts(start=2008, stop=2014, clean_level='none', drift_inst=None,
    Severity: Major
    Found in growin/_core.py - About 1 hr to fix

      Function get_growth has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def get_growth(tag, day, year, lon, exb_drifts=None, ve01=0, f10=120.0):
      Severity: Major
      Found in growin/_core.py - About 50 mins to fix

        There are no issues that match your filters.

        Category
        Status