Showing 809 of 809 total issues
Function get_spam_for_time_slice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_spam_for_time_slice(self, room_id, user_id, from_time_int, to_time_int, session=None) -> list:
Function kick_user
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kick_user(
Function join_activity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def join_activity(user_id: str, user_name: str, target_id: str, session_ids: list, namespace: str) -> dict:
Function leave_activity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def leave_activity(user_id: str, user_name: str, target_id: str, session_ids: list, namespace: str) -> dict:
Function join_room
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def join_room(self, user_id, user_name, room_id, session_ids, namespace) -> None:
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(self, key, default: Union[None, object]=DefaultValue, params=None, domain=None):
Function update_spam_config
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_spam_config(self, enabled, max_length, min_length, should_delete, should_save) -> None:
Function ban_user_global
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ban_user_global(self, user_id: str, ban_timestamp: str, ban_duration: str, reason: str=None, banner_id: str=None) -> None:
Function set_channel_ban_timestamp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_channel_ban_timestamp(self, channel_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
Function set_room_ban_timestamp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_room_ban_timestamp(self, room_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
Function update_acl_in_room_for_action
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_acl_in_room_for_action(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
Function set_channel_ban_timestamp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_channel_ban_timestamp(self, channel_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
Function join_room
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def join_room(self, user_id: str, user_name: str, room_id: str, room_name: str, sid=None) -> None:
Function leave_room
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def leave_room(self, user_id, user_name, room_id, session_ids, namespace) -> None:
Function update_acl_in_room_for_action
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_acl_in_room_for_action(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
Function update_room_acl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_room_acl(self, channel_id: str, room_id: str, action: str, acl_type: str, acl_value: str) -> None:
Function set_room_ban_timestamp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_room_ban_timestamp(self, room_id: str, user_id: str, duration: str, timestamp: str, username: str) -> None:
Function _split_and_test_clause
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _split_and_test_clause(self, groups, clause, is_validating_a_user: bool=False, activity: Activity=None, env=None):
Function log_values
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log_values(solr_online, solr_visible, wio_online, wio_status, wio_api_value):
Function check_if_remove_room_empty
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
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:
- 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"