Showing 423 of 423 total issues
Function get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(self, request, datastore_id = None, *args, **kwargs):
"""
Lists all datastores of the user or returns a specific datastore with content
:param request:
- 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 s3_construct_signed_download_url
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def s3_construct_signed_download_url(bucket, region, access_key_id, secret_access_key, hash_checksum, endpoint_url=None):
Function post
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def post(self, request, *args, **kwargs):
"""
Updates a specific datastore
:param request:
- 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 create_url
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_url(client_id_email, key, method, path, content_type='', content_md5=''):
Function s3_construct_signed_upload_url
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def s3_construct_signed_upload_url(bucket, region, access_key_id, secret_access_key, hash_checksum, endpoint_url=None):
Function validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, attrs: dict) -> dict:
verification_hex = attrs.get('verification', '')
verification = nacl.encoding.HexEncoder.decode(verification_hex)
verification_nonce_hex = attrs.get('verification_nonce', '')
verification_nonce = nacl.encoding.HexEncoder.decode(verification_nonce_hex)
- 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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(self, request, *args, **kwargs):
"""
Returns the statistics of used devices
:param args:
- 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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(self, request, *args, **kwargs):
"""
Returns the statistics of used operations_systems
:param args:
- 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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, attrs: dict) -> dict:
user_id = self.context['request'].parser_context['kwargs'].get('user_id', False)
if user_id:
try:
- 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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, attrs: dict) -> dict:
group_id = self.context['request'].parser_context['kwargs'].get('group_id', False)
if group_id:
try:
- 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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(self, request, *args, **kwargs):
"""
Returns the chunks that should be cleaned up by this fileserver
:param request:
- 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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate(self, attrs: dict) -> dict:
group_id = self.context['request'].parser_context['kwargs'].get('group_id', False)
if group_id:
try:
- 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
Consider simplifying this complex logical expression. Open
if authkey_changed or public_key_changed or secret_key_changed or secret_key_nonce_changed or private_key_changed or private_key_nonce_changed:
if hashing_parameters_changed or hashing_algorithm_changed:
Old_Credential.objects.filter(user_id=stored_user.id).delete()
Function fileserver_access
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fileserver_access(cmsl, ip_address, read=None, write=None, allow_link_shares=None):
Function do_delete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_delete(bucket, region, access_key_id, secret_access_key, hash_checksum):
Function user_has_rights_on_file_repository
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def user_has_rights_on_file_repository(user_id: str = "", file_repository_id: str = "", read: bool = None, write: bool = None, grant: bool = None) -> bool:
Function do_construct_signed_upload_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_construct_signed_upload_url(bucket, region, access_key_id, secret_access_key, hash_checksum):
Function api_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def api_request(method, endpoint, data = None, token = None, session_secret_key = None):
Function do_construct_signed_download_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_construct_signed_download_url(bucket, region, access_key_id, secret_access_key, hash_checksum):
Function backblaze_construct_signed_download_url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def backblaze_construct_signed_download_url(bucket, region, access_key_id, secret_access_key, hash_checksum):