Function plot_volume
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def plot_volume(
image: Image,
radiological=True,
channel=-1, # default to foreground for binary maps
axes=None,
- 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 plot_subject
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def plot_subject(
subject: Subject,
cmap_dict=None,
show=True,
output_path=None,
- 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 plot_volume
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_volume(
Function plot_volume
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def plot_volume(
image: Image,
radiological=True,
channel=-1, # default to foreground for binary maps
axes=None,
Function make_gif
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_gif(
Function plot_subject
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_subject(
Function make_gif
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def make_gif(
tensor: torch.Tensor,
axis: int,
duration: float, # of full gif
output_path: TypePath,
- 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 color_labels
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def color_labels(arrays, cmap_dict):
results = []
for array in arrays:
si, sj = array.shape
rgb = np.zeros((si, sj, 3), dtype=np.uint8)
- 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"