File provider.py
has 3266 lines of code (exceeds 250 allowed). Consider refactoring. Open
import base64
import copy
import datetime
import json
import logging
Function get_object
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def get_object(
self,
context: RequestContext,
request: GetObjectRequest,
) -> GetObjectOutput:
- 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 put_object
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def put_object(
self,
context: RequestContext,
request: PutObjectRequest,
) -> PutObjectOutput:
- 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_bucket
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def create_bucket(
self,
context: RequestContext,
request: CreateBucketRequest,
) -> CreateBucketOutput:
- 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 complete_multipart_upload
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_multipart_upload(
Function list_objects_v2
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_objects_v2(
Function list_parts
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_parts(
Function list_object_versions
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_object_versions(
Function list_objects
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_objects(
Function put_object_retention
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object_retention(
Function list_multipart_uploads
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_multipart_uploads(
Function put_object_tagging
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object_tagging(
Function put_object_legal_hold
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object_legal_hold(
Function delete_object
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_object(
Function put_object_lock_configuration
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_object_lock_configuration(
Function restore_object
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def restore_object(
Function delete_objects
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_objects(
Function put_bucket_versioning
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_versioning(
Function put_bucket_replication
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_replication(
Function put_bucket_policy
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_policy(
Function put_object
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def put_object(
self,
context: RequestContext,
request: PutObjectRequest,
) -> PutObjectOutput:
Function get_object
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_object(
self,
context: RequestContext,
request: GetObjectRequest,
) -> GetObjectOutput:
Function abort_multipart_upload
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def abort_multipart_upload(
Function put_bucket_request_payment
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_request_payment(
Function get_object_tagging
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_tagging(
Function put_public_access_block
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_public_access_block(
Function get_object_acl
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_acl(
Function put_bucket_encryption
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_encryption(
Function put_bucket_website
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_website(
Function put_bucket_cors
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_cors(
Function get_object_legal_hold
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_legal_hold(
Function put_bucket_logging
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_logging(
Function put_bucket_tagging
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_tagging(
Function get_object_retention
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_retention(
Function put_bucket_notification_configuration
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_notification_configuration(
Function get_object_torrent
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_torrent(
Function put_bucket_inventory_configuration
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_inventory_configuration(
Function put_bucket_lifecycle_configuration
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_lifecycle_configuration(
Function put_bucket_ownership_controls
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_ownership_controls(
Function put_bucket_accelerate_configuration
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_accelerate_configuration(
Function put_bucket_analytics_configuration
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_analytics_configuration(
Function delete_object_tagging
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_object_tagging(
Function delete_bucket_analytics_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_analytics_configuration(
Function get_bucket_inventory_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_inventory_configuration(
Function get_bucket_accelerate_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_accelerate_configuration(
Function list_bucket_inventory_configurations
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_bucket_inventory_configurations(
Function list_bucket_analytics_configurations
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_bucket_analytics_configurations(
Function get_bucket_analytics_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_analytics_configuration(
Function put_bucket_intelligent_tiering_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def put_bucket_intelligent_tiering_configuration(
Function delete_bucket_inventory_configuration
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_inventory_configuration(
Function delete_bucket_tagging
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_tagging(
Function get_bucket_intelligent_tiering_configuration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_intelligent_tiering_configuration(
Function delete_bucket_ownership_controls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_ownership_controls(
Function get_bucket_policy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_policy(
Function delete_bucket_cors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_cors(
Function get_bucket_replication
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_replication(
Function get_bucket_website
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_website(
Function get_bucket_ownership_controls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_ownership_controls(
Function delete_bucket_policy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_policy(
Function delete_bucket_intelligent_tiering_configuration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_intelligent_tiering_configuration(
Function get_bucket_encryption
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_encryption(
Function get_bucket_lifecycle_configuration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_lifecycle_configuration(
Function delete_public_access_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_public_access_block(
Function get_bucket_acl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_acl(
Function delete_bucket_website
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_website(
Function post_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def post_object(
Function get_bucket_versioning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_versioning(
Function get_bucket_request_payment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_request_payment(
Function delete_bucket_replication
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_replication(
Function delete_bucket_encryption
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_encryption(
Function get_bucket_tagging
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_tagging(
Function get_public_access_block
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_public_access_block(
Function get_object_lock_configuration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_object_lock_configuration(
Function get_bucket_policy_status
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_policy_status(
Function get_bucket_notification_configuration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_notification_configuration(
Function get_bucket_cors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_cors(
Function delete_bucket_lifecycle
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete_bucket_lifecycle(
Function list_bucket_intelligent_tiering_configurations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_bucket_intelligent_tiering_configurations(
Function get_bucket_logging
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_bucket_logging(