RnDAO/tc-messageBrokerPython

View on GitHub

Showing 22 of 25 total issues

Function to_dict has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

def to_dict(self) -> dict:
"""
Convert the data into guild instance.
Note that the kyes would follow the camelCase format
 
 
Severity: Minor
Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/guild.py - About 6 hrs to fix

Function __init__ has 44 arguments (exceeds 4 allowed). Consider refactoring.
Open

def __init__(
Severity: Major
Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/guild.py - About 5 hrs to fix

    File message_broker.py has 388 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import asyncio
    import functools
    import json
    import logging
    from datetime import datetime
    Severity: Minor
    Found in tc_messageBroker/message_broker.py - About 5 hrs to fix

      Function to_dict has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

      def to_dict(self) -> dict[str, Any]:
      data: dict[str, Any] = {
      "id": self.id,
      }
      if self.application_id is not None:

      Function __init__ has 28 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def __init__(

        Function __init__ has 20 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def __init__(
        Severity: Major
        Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/user.py - About 2 hrs to fix

          File saga_base.py has 264 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import logging
          import uuid
          from datetime import datetime
          from typing import Any, Callable, Optional
           
           
          Severity: Minor
          Found in tc_messageBroker/rabbit_mq/saga/saga_base.py - About 2 hrs to fix

            File guild.py has 256 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            from typing import Any
             
             
            class Guild:
            def __init__(
            Severity: Minor
            Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/guild.py - About 2 hrs to fix

              Function to_dict has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def to_dict(self) -> dict:
              """
              Convert the data into guild instance.
              Note that the kyes would follow the camelCase format
               
               
              Severity: Minor
              Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/guild.py - About 1 hr to fix

                Function __init__ has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                def __init__(
                self,
                id: str | None = None,
                name: str | None = None,
                icon: str | None = None,
                Severity: Minor
                Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/guild.py - About 1 hr to fix

                  Function __init__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def __init__(
                  Severity: Major
                  Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/embed.py - About 1 hr to fix

                    Function __init__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def __init__(

                      Function __init__ has 12 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def __init__(

                        Function to_dict has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def to_dict(self) -> dict:
                        data = {}
                        if self.content is not None:
                        data["content"] = self.content
                        if self.username is not None:

                        Function to_dict has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        def to_dict(self) -> dict[str, Any]:
                        data: dict[str, Any] = {
                        "id": self.id,
                        }
                        if self.application_id is not None:

                          Function __init__ has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          def __init__(
                          self,
                          id: str,
                          application_id: int | None = None,
                          type: int | None = None,

                            Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def __init__(
                            Severity: Major
                            Found in tc_messageBroker/rabbit_mq/payload/discord_bot/base_types/member.py - About 1 hr to fix

                              Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def __init__(
                              Severity: Major
                              Found in tc_messageBroker/rabbit_mq/payload/discord_bot/edit_webhook_data.py - About 1 hr to fix

                                Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def __init__(

                                  Function to_dict has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def to_dict(self) -> dict:
                                  data_dict = {}
                                  if self.content is not None:
                                  data_dict["content"] = self.content
                                  if self.thread_id is not None:
                                  Severity: Minor
                                  Found in tc_messageBroker/rabbit_mq/payload/discord_bot/edit_webhook_data.py - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language