Showing 86 of 86 total issues
Avoid too many return
statements within this function. Open
return "html"
Function load_inline_string
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_inline_string(self, code_string):
from nbconvert import filters
outputs = self.loadstring(code_string)
result = ""
- 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 _getoldresults
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _getoldresults(self):
"""Get the results of previous run for documentation mode"""
success = self.restore()
if not success:
- 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 formatfigure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def formatfigure(self, chunk):
result = ""
figstring = ""
for fig in chunk["figure"]:
figstring += '<img src="%s" width="%s"/>\n' % (fig, chunk["width"])
- 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 formatfigure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def formatfigure(self, chunk):
result = ""
figstring = ""
for fig in chunk["figure"]:
- 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 publish
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def publish(
file, doc_format="html", theme="skeleton", latex_engine="pdflatex", output=None
):
"""Publish python script and results to html or pdf, expects that doc
chunks are written in markdown.
- 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"