bitranox/lib_log_utils

View on GitHub

Showing 37 of 37 total issues

Function log_spam has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def log_spam(
Severity: Minor
Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

    Function log_success has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def log_success(
    Severity: Minor
    Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

      Function _add_handler has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _add_handler(
      Severity: Minor
      Found in lib_log_utils/log_handlers.py - About 45 mins to fix

        Function log_info has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def log_info(
        Severity: Minor
        Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

          Function banner_verbose has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def banner_verbose(
          Severity: Minor
          Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

            Function banner_success has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def banner_success(
            Severity: Minor
            Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

              Function banner_critical has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def banner_critical(
              Severity: Minor
              Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                Function log_critical has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def log_critical(
                Severity: Minor
                Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                  Function banner_warning has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def banner_warning(
                  Severity: Minor
                  Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                    Function log_notice has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def log_notice(
                    Severity: Minor
                    Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                      Function banner_error has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def banner_error(
                      Severity: Minor
                      Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                        Function banner_info has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def banner_info(
                        Severity: Minor
                        Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                          Function log_error has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def log_error(
                          Severity: Minor
                          Found in lib_log_utils/lib_log_utils.py - About 45 mins to fix

                            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()
                            
                                """
                            Severity: Minor
                            Found in lib_log_utils/log_handlers.py - About 25 mins to fix

                            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,
                            Severity: Minor
                            Found in lib_log_utils/lib_log_utils_cli.py - About 25 mins to fix

                            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()
                            Severity: Minor
                            Found in lib_log_utils/log_handlers.py - About 25 mins to fix

                            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'])
                            Severity: Minor
                            Found in lib_log_utils/log_handlers.py - About 25 mins to fix

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language