Showing 91 of 337 total issues
Function add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add(self, bucket, identifier, data, ttl=None, expires=None, delayed_db_op=False):
Function _get_identifier
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _get_identifier(fixed_identifier, identify_from_kwarg_name,
Function add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add(self, bucket, identifier, data, ttl=None, expires=None, delayed_db_op=False):
Function delete_expired
has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring. Open
Open
def delete_expired(self):
bucket_names_db = []
timestamp = time()
for bucket in cache_utils.BUCKETS:
if bucket['is_persistent']:
- 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 insert_episode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def insert_episode(self, tvshowid, seasonid, episodeid, file_path):
Function execute_library_task_gui
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def execute_library_task_gui(self, videoid, task_type, title, nfo_settings=None, show_prg_dialog=True):
Function get_video_list_sorted
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_video_list_sorted(self, pathitems, menu_data, sub_genre_id, perpetual_range_start, is_dynamic_id):
Function _search_results_directory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _search_results_directory(search_value, menu_data, dir_items, extra_data, dir_update_listing):
Function perpetual_path_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def perpetual_path_request(self, paths, length_params, perpetual_range_start=None,
Function _add_missing_items
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _add_missing_items(self, tasks, season, videoid, metadata, nfo_settings):
Function auto_update_library
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def auto_update_library(self, sync_with_mylist, show_prg_dialog=True, show_nfo_dialog=False, clear_on_cancel=False,
Function get_video_list_sorted_sp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_video_list_sorted_sp(self, pathitems, menu_data, context_name, context_id, perpetual_range_start):
Function _create_episode_item
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _create_episode_item(seasonid, episodeid_value, episode, episodes_list, common_data):
Function get_tvshow_property
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_tvshow_property(self, tvshowid, enum_vid_prop, default_value=None, data_type=None):
Function show_browse_dialog
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def show_browse_dialog(title, browse_type=0, default_path=None, multi_selection=False, extensions=None):
Function perpetual_path_request_switch_profiles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def perpetual_path_request_switch_profiles(self, paths, length_params, perpetual_range_start=None,
Function get_watched_status
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_watched_status(self, profile_guid, videoid, default_value=None, data_type=None):
Function _update_library
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _update_library(self, videoids_tasks, exp_tvshows_videoids_values, show_prg_dialog, show_nfo_dialog,
Function _path_to_videoid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _path_to_videoid(kwargs, pathitems_arg, path_offset,
Function _create_profile_item
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _create_profile_item(profile_guid, is_selected, is_autoselect, is_library_playback, detailed_info):