cnap-cobre/synapse

View on GitHub
backend/apps/transfer/dropbox_adapter.py

Summary

Maintainability
A
55 mins
Test Coverage

Showing 4 of 4 total issues

Function upload has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def upload(self, localPath, remotePath, user, uniqueBatchId):
token_query = user.profile.tokens.filter(app__provider='dropbox')
 
if not token_query.exists():
raise PermissionDenied('No dropbox token found.')
Severity: Minor
Found in backend/apps/transfer/dropbox_adapter.py - About 55 mins to fix

Line too long (95 > 79 characters)
Open

filter(lambda x: isinstance(x, dropbox.files.FolderMetadata), response.entries)

No newline at end of file
Open

pass

Line too long (93 > 79 characters)
Open

filter(lambda x: isinstance(x, dropbox.files.FileMetadata), response.entries)

There are no issues that match your filters.

Category
Status