Function write
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def write(
self,
*objects: Any,
style: str = None,
sep: str = 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 write_json
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_json(
Function table
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def table(
Function write
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(
Function error_write
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def error_write(
Function prompt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def prompt(
self, text: str, choices: Iterable[str] = None, password: bool = False
) -> Optional[str]:
while True:
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 table
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def table(
self,
data: "TableData",
headers: "Headers" = None,
markdown: bool = 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"