Showing 28 of 47 total issues
File cli.py
has 771 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Buzio main code.
This is the main code for Buzio Package
It contains the Console class.
Function ask
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def ask(
self,
obj,
theme="warning",
transform=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
File tests.py
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
"""Unittest module."""
import unittest
import datetime
from buzio.cli import Console
Function _humanize
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def _humanize(self, obj, **kwargs):
"""Summary
Args:
obj (TYPE): Description
- 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 run
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def run(
self,
task,
title=None,
get_stdout=False,
- 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 choose
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def choose(
self,
choices,
question=None,
theme="choose",
- 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 _print
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _print(self, linebreak=False):
"""Summary
Parameters
----------
- 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
Console
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Console():
"""Console class.
Attributes:
DEFAULT_THEMES (Dict): Default color theme
Function select
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def select(self,
obj,
theme="choose",
humanize=True,
question=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 confirm
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def confirm(
self,
obj=None,
theme="confirm",
transform=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 ask
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def ask(
Function run
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function section
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def section(
Function error
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def error(
Function info
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def info(
Function choose
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def choose(
Function warning
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def warning(
Function _run_style
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _run_style(self, obj, theme, transform,
Function progress
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def progress(self, count, total, prefix=_('Reading'), theme=None,
Function success
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def success(