thenetcircle/dino

View on GitHub

Showing 809 of 809 total issues

Function get_spam_for_time_slice has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def get_spam_for_time_slice(self, room_id, user_id, from_time_int, to_time_int, session=None) -> list:
Severity: Minor
Found in dino/db/rdbms/handler.py - About 35 mins to fix

    Function kick_user has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def kick_user(
    Severity: Minor
    Found in dino/db/manager/users.py - About 35 mins to fix

      Function join_activity has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def join_activity(user_id: str, user_name: str, target_id: str, session_ids: list, namespace: str) -> dict:
      Severity: Minor
      Found in dino/db/manager/users.py - About 35 mins to fix

        Function leave_activity has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def leave_activity(user_id: str, user_name: str, target_id: str, session_ids: list, namespace: str) -> dict:
        Severity: Minor
        Found in dino/db/manager/users.py - About 35 mins to fix

          Function join_room has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def join_room(self, user_id, user_name, room_id, session_ids, namespace) -> None:
          Severity: Minor
          Found in dino/db/manager/users.py - About 35 mins to fix

            Function get has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def get(self, key, default: Union[None, object]=DefaultValue, params=None, domain=None):
            Severity: Minor
            Found in dino/environ.py - About 35 mins to fix

              Function update_spam_config has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def update_spam_config(self, enabled, max_length, min_length, should_delete, should_save) -> None:
              Severity: Minor
              Found in dino/db/__init__.py - About 35 mins to fix

                Function ban_user_global has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def ban_user_global(self, user_id: str, ban_timestamp: str, ban_duration: str, reason: str=None, banner_id: str=None) -> None:
                Severity: Minor
                Found in dino/db/__init__.py - About 35 mins to fix

                  Function set_channel_ban_timestamp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def set_channel_ban_timestamp(self, channel_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
                  Severity: Minor
                  Found in dino/cache/__init__.py - About 35 mins to fix

                    Function set_room_ban_timestamp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def set_room_ban_timestamp(self, room_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
                    Severity: Minor
                    Found in dino/cache/__init__.py - About 35 mins to fix

                      Function update_acl_in_room_for_action has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def update_acl_in_room_for_action(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
                      Severity: Minor
                      Found in dino/db/__init__.py - About 35 mins to fix

                        Function set_channel_ban_timestamp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def set_channel_ban_timestamp(self, channel_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
                        Severity: Minor
                        Found in dino/cache/redis.py - About 35 mins to fix

                          Function join_room has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def join_room(self, user_id: str, user_name: str, room_id: str, room_name: str, sid=None) -> None:
                          Severity: Minor
                          Found in dino/db/rdbms/handler.py - About 35 mins to fix

                            Function leave_room has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def leave_room(self, user_id, user_name, room_id, session_ids, namespace) -> None:
                            Severity: Minor
                            Found in dino/db/manager/users.py - About 35 mins to fix

                              Function update_acl_in_room_for_action has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def update_acl_in_room_for_action(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
                              Severity: Minor
                              Found in dino/db/rdbms/handler.py - About 35 mins to fix

                                Function update_room_acl has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def update_room_acl(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
                                Severity: Minor
                                Found in dino/db/manager/acls.py - About 35 mins to fix

                                  Function set_room_ban_timestamp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def set_room_ban_timestamp(self, room_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
                                  Severity: Minor
                                  Found in dino/cache/redis.py - About 35 mins to fix

                                    Function _split_and_test_clause has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def _split_and_test_clause(self, groups, clause, is_validating_a_user: bool=False, activity: Activity=None, env=None):
                                    Severity: Minor
                                    Found in dino/validation/acl.py - About 35 mins to fix

                                      Function log_values has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def log_values(solr_online, solr_visible, wio_online, wio_status, wio_api_value):
                                      Severity: Minor
                                      Found in bin/poll_online_status.py - About 35 mins to fix

                                        Function check_if_remove_room_empty has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        def check_if_remove_room_empty(activity: Activity, user_name=None, is_delayed_removal: bool = False):
                                            user_id = activity.actor.id
                                            room_id = activity.target.id
                                        
                                            if user_name is None:
                                        Severity: Minor
                                        Found in dino/utils/__init__.py - About 35 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