acutesoftware/AIKIF

View on GitHub

Showing 136 of 361 total issues

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

def GetWordForIndex(ndxToFind, lst):
    wrdResult = []
    for i in lst:
        src = i[0]
        ndx = i[1]
Severity: Minor
Found in aikif/ontology/read_wordnet.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 main has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def main():

    # define the project
    prj_random = prj.Project(name='Random Information Request', desc=desc, fldr=proj_fldr)
    
Severity: Minor
Found in scripts/examples/random_info.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 read_csv_to_html_list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def read_csv_to_html_list(csvFile):
    """
    reads a CSV file and converts it to a HTML List
    """
    txt = ''
Severity: Minor
Found in aikif/web_app/web_utils.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 format_file_to_html_row has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def format_file_to_html_row(fname, lstCols):
    txt = '<TR>'
    if 'FullName' in lstCols: 
        txt += '<TD>' + fname + '</TD>' 
    if 'FileName' in lstCols: 
Severity: Minor
Found in aikif/web_app/page_programs.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 count_blank_positions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def count_blank_positions(self):
        """
        return a count of blank cells
        """
        blanks = 0
Severity: Minor
Found in aikif/toolbox/cls_grid.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 process_input has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def process_input(self, question):
        """
        takes a question and returns the best answer based on known skills
        """
        ans = ''
Severity: Minor
Found in scripts/examples/aggie/aggie.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_text_to_table has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def parse_text_to_table(txt):
    """
    takes a blob of text and finds delimiter OR guesses
    the column positions to parse into a table.
    input:   txt = blob of text, lines separated by \n
Severity: Minor
Found in aikif/toolbox/text_tools.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 draw_cell has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def draw_cell(self, row, col, val):
        """
        draw a cell as position row, col containing val
        """
        if val == 'T':
Severity: Minor
Found in scripts/examples/gui_view_world.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 execute_tasks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def execute_tasks(self):
        """
        run execute on all tasks IFF prior task is successful
        """
        for t in self.tasks:
Severity: Minor
Found in aikif/project.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_file_to_dict has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def parse_file_to_dict(self, fname):
        """
        process the file according to the mapping rules.
        The cols list must match the columns in the filename
        """
Severity: Minor
Found in aikif/mapper.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 format_file_table_header has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def format_file_table_header(lstCols):
    txt = '<TR>'
    if 'FullName' in lstCols: 
        txt += '<TD>Full Path and Filename</TD>' 
    if 'FileName' in lstCols: 
Severity: Minor
Found in aikif/web_app/page_programs.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 multi_split has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def multi_split(txt, delims):
    """ 
    split by multiple delimiters 
    """
    res = [txt]
Severity: Minor
Found in aikif/index.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 SaveAsCSV has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def SaveAsCSV(lst, fname):  
    def formatListItemCSV(itm):  
        def StripLineBreaks(txt):
            # also double quotes "
            result = ''
Severity: Minor
Found in aikif/ontology/createMindOntology.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 count_filled_positions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def count_filled_positions(self):
        """
        return a count of blank cells
        """
        filled = 0
Severity: Minor
Found in aikif/toolbox/cls_grid.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 where_am_i has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def where_am_i():
    """
    high level function that can estimate where user is based 
    on predefined setups.
    """
Severity: Minor
Found in aikif/lib/cls_context.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_text_by_col_pos has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def parse_text_by_col_pos(txt, fixed_split):
    tbl = []
    cur_pos = 0
    lines = txt.split('\n')
    for line in lines:
Severity: Minor
Found in aikif/toolbox/text_tools.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