fuzeman/byte-sqlite

View on GitHub

Showing 4 of 18 total issues

SqliteExpressions has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class SqliteExpressions(Expressions):
    """SQLite expressions class."""

    @property
    def compiler(self):
Severity: Minor
Found in byte/compilers/sqlite/models/expressions.py - About 2 hrs to fix

    Function compile has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def compile(self, query):
            """Compile :code:`query` into SQLite query.
    
            :param query: Select Query
            :type query: byte.queries.SelectQuery
    Severity: Minor
    Found in byte/compilers/sqlite/select.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 match has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def match(cls, source):
            """Find an expression matching the provided `source` expression.
    
            :param source: Source Expression
            :type source: byte.core.models.expressions.base.Expression
    Severity: Minor
    Found in byte/compilers/sqlite/models/expressions.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 parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def parse(cls, compiler, source):
            """Parse `source` expression into SQLite expression.
    
            :param compiler: Compiler
            :type compiler: byte.compilers.core.base.Compiler
    Severity: Minor
    Found in byte/compilers/sqlite/models/expressions.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