lib_log_utils/lib_log_utils.py
File lib_log_utils.py
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# STDLIB
from typing import Optional, Union
import logging
import logging.handlers
Function log_level
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
def log_level(
message: str,
level: Optional[int] = None,
width: Optional[int] = None,
wrap: Optional[bool] = 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 log_level
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_level(
Function banner_debug
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_debug(
Function log_verbose
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_verbose(
Function banner_notice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_notice(
Function log_debug
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_debug(
Function log_warning
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_warning(
Function banner_spam
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_spam(
Function log_spam
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_spam(
Function log_success
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_success(
Function log_info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_info(
Function banner_verbose
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_verbose(
Function banner_success
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_success(
Function banner_critical
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_critical(
Function log_critical
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_critical(
Function banner_warning
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_warning(
Function log_notice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_notice(
Function banner_error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_error(
Function banner_info
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def banner_info(
Function log_error
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_error(