Showing 37 of 37 total issues
Function log_spam
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_spam(
Function log_success
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_success(
Function _add_handler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_handler(
Function log_info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_info(
Function banner_verbose
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_verbose(
Function banner_success
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_success(
Function banner_critical
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_critical(
Function log_critical
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_critical(
Function banner_warning
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_warning(
Function log_notice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_notice(
Function banner_error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_error(
Function banner_info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def banner_info(
Function log_error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_error(
Function logger_flush_all_handlers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def logger_flush_all_handlers(logger: logging.Logger = logging.getLogger()) -> None:
"""
>>> logger_flush_all_handlers()
"""
- 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 do_log
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def do_log(
message: str,
level_str: str = "info",
extended: Optional[bool] = None,
banner: 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"
Further reading
Function exists_handler_with_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def exists_handler_with_name(name: str) -> bool:
"""
>>> discard = set_stream_handler()
>>> assert exists_handler_with_name('stream_handler')
>>> discard2 = set_stream_handler_color()
- 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_handler_by_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_handler_by_name(name: str) -> logging.Handler:
"""
>>> import unittest
>>> logger = set_stream_handler()
>>> unittest.TestCase().assertIsNotNone(get_handler_by_name, ['console_handler'])
- 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"