Showing 37 of 37 total issues
Avoid deeply nested control flow statements. Open
if i.strip():
return table_list
raise EmptyTableError
Avoid deeply nested control flow statements. Open
if cell_n_new > 1:
temp[j + 1].append((width_int_resid, cell_n_new))
else:
temp[j + 1].append(width_int_resid)
Avoid deeply nested control flow statements. Open
if founds:
found = founds[0]
has_ica = True
ica_temp = found[1]
ica = f'[]{ica_temp}' if ica_temp else ''
Function table_to_codeblock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def table_to_codeblock(
Function put
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def put(
Function from_panflute_ast
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def from_panflute_ast(cls, table: Table) -> PanTable:
ica_table = Ica(
table.identifier,
table.classes,
table.attributes,
- Read upRead up
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
Avoid deeply nested control flow statements. Open
if ica_row:
icas_row[i] = f'[]{ica_row}'
else:
Avoid deeply nested control flow statements. Open
if body_list and 'body' not in last_body:
last_body['body'] = temp
else:
body_list.append({'body': temp})
# is_body_head
Avoid deeply nested control flow statements. Open
if marker:
temp_markers.append(marker)
temp_icas.append(found[0])
temp_idxs.append(i)
# * ignore the case that somone might put 2 attrs side-by-side
Avoid deeply nested control flow statements. Open
if ica_:
ica = ica_
else:
Function convert_texts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert_texts(
Function to_spec
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def to_spec(self, size: int) -> Spec:
'''to Spec
assume normalized self.
'''
- Read upRead up
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 to_pantable
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def to_pantable(self) -> PanTable:
'''return a PanTable representation of self
'''
cells = self.cells
contents = cells.contents
- Read upRead up
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 to_panflute_ast
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_panflute_ast(self) -> CodeBlock:
'''return a panflute AST representation
TODO: handle differently if include exists and writable
need to be able to configure pantable2csv on write location
- Read upRead up
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_yaml_dumper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_yaml_dumper():
try:
from yamlloader.ordereddict.dumpers import CSafeDumper as Dumper
except ImportError:
try:
- Read upRead up
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 cannonical
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cannonical(self) -> TableArray:
'''return a cell array where spanned cells appeared in cannonical location only
top-left corner of the grid is the cannonical location of a spanned cell
'''
- Read upRead up
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 panflute_tablecells
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def panflute_tablecells(self) -> np.ndarray[TableCell]:
cells = self.cells
contents = cells.contents
shape = contents.shape
m, n = shape
- Read upRead up
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"