KarrLab/obj_tables

View on GitHub

Showing 425 of 542 total issues

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

    def value_equal(self, val1, val2, tol=0.):
        """ Determine if attribute values are equal, optionally,
        up to a tolerance

        Args:
Severity: Minor
Found in obj_tables/core.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

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

    def clean(self, value):
        """ Deserialize value

        Args:
            value (:obj:`str`): semantically equivalent representation
Severity: Minor
Found in obj_tables/core.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

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

    def _parse_attr_path_el(cls, attr):
        """ Parse an element of a path to a nested attribute

        Args:
            attr (:obj:`list` of :obj:`dict`): an element of a path to a nested attribute
Severity: Minor
Found in obj_tables/core.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

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

    def __init__(self, min=float('nan'), max=float('nan'), nan=True,
                 default=float('nan'), default_cleaned_value=float('nan'), none_value=float('nan'), verbose_name='', description='',
                 primary=False, unique=False):
        """
        Args:
Severity: Minor
Found in obj_tables/core.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

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

    def parse_worksheet_heading_metadata(cls, heading, sheet_name=None):
        """ Parse key-value pairs of metadata from heading

        Args:
            heading (:obj:`str`): heading with key-value pairs of metadata
Severity: Minor
Found in obj_tables/io.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