File provider.py
has 1762 lines of code (exceeds 250 allowed). Consider refactoring. Open
import copy
import json
import logging
import os
import random
Function update_table
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def update_table(
self, context: RequestContext, update_table_input: UpdateTableInput
) -> UpdateTableOutput:
table_name = update_table_input["TableName"]
global_table_region = self.get_global_table_region(context, table_name)
- 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 delete_expired_items
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def delete_expired_items() -> int:
"""
This utility function iterates over all stores, looks for tables with TTL enabled,
scan such tables and delete expired items.
"""
- 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 describe_table
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def describe_table(
self, context: RequestContext, table_name: TableName, **kwargs
) -> DescribeTableOutput:
global_table_region = self.get_global_table_region(context, table_name)
- 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_table
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def create_table(
self,
context: RequestContext,
create_table_input: CreateTableInput,
) -> CreateTableOutput:
- 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 prepare_transact_write_item_records
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def prepare_transact_write_item_records(
Function get_updated_records
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_updated_records(
Function disable_kinesis_streaming_destination
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def disable_kinesis_streaming_destination(
Function list_global_tables
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_global_tables(
Function prepare_batch_write_item_records
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def prepare_batch_write_item_records(
Function enable_kinesis_streaming_destination
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def enable_kinesis_streaming_destination(
Function list_tags_of_resource
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_tags_of_resource(
Function tag_resource
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def tag_resource(
Function batch_get_item
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def batch_get_item(
Function batch_execute_statement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def batch_execute_statement(
Function update_time_to_live
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_time_to_live(
Function create_global_table
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_global_table(
Function update_continuous_backups
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_continuous_backups(
Function untag_resource
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def untag_resource(
Function update_global_table
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_global_table(
Function list_tables
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def list_tables(