Showing 3 of 3 total issues
Cyclomatic complexity is too high in function get_media_response. (7) Open
def get_media_response(request, data, permissions=None, headers=None): # For compatibility purpose content, url = None, None if isinstance(data, (File, )): content, url = data, data.url
- Read upRead up
- Exclude checks
Function get_media_response
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_media_response(request, data, permissions=None, headers=None): # For compatibility purpose content, url = None, None if isinstance(data, (File, )): content, url = data, data.url
- Read upRead up
Merge this if statement with the enclosing one. Open
if not set(permissions).intersection(
- Read upRead up
- Exclude checks