def remove_unused_resources(issues, app_dir, ignore_layouts):
    """
    Remove the file or the value inside the file depending if the whole file is unused or not.
    """
    for issue in issues:
        filepath = os.path.join(app_dir, issue.filepath)
        if issue.remove_file:
            remove_resource_file(issue, filepath, ignore_layouts)
        else:
            remove_resource_value(issue, filepath)
def remove_unused_resources ( issues , app_dir , ignore_layouts ) : for issue in issues : filepath = os . path . join ( app_dir , issue . filepath ) if issue . remove_file : remove_resource_file ( issue , filepath , ignore_layouts ) else : remove_resource_value ( issue , filepath )
Remove the file or the value inside the file depending if the whole file is unused or not.