Showing 3,140 of 3,140 total issues
File __init__.py
has 1145 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from datetime import datetime
from typing import Dict, List, Optional, TypedDict
from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
File container_client.py
has 1123 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import dataclasses
import io
import ipaddress
import logging
import os
SsmApi
has 139 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class SsmApi:
service = "ssm"
version = "2014-11-06"
@handler("AddTagsToResource")
File __init__.py
has 1048 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from datetime import datetime
from typing import Dict, List, Optional, TypedDict
from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
RedshiftApi
has 133 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class RedshiftApi:
service = "redshift"
version = "2012-12-01"
@handler("AcceptReservedNodeExchange")
File provider.py
has 1034 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import logging
import re
from collections import defaultdict
from copy import deepcopy
Keyword_or_stringContext
has 130 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Keyword_or_stringContext(ParserRuleContext):
__slots__ = 'parser'
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
super().__init__(parent, invokingState)
File bootstrap.py
has 1000 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from __future__ import annotations
import copy
import functools
import logging
File models.py
has 990 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import hashlib
import heapq
import inspect
import json
import logging
File config.py
has 972 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import logging
import os
import platform
import socket
import subprocess
File provider.py
has 963 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import logging
from typing import Dict, List
from botocore.utils import InvalidArnException
ApigatewayApi
has 120 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ApigatewayApi:
service = "apigateway"
version = "2015-07-09"
@handler("CreateApiKey")
File parser.py
has 909 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""
Request parsers for the different AWS service protocols.
The module contains classes that take an HTTP request to a service, and
given an operation model, parse the HTTP request according to the
File integration.py
has 876 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
import json
import logging
import re
from abc import ABC, abstractmethod
ASLParserVisitor
has 103 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ASLParserVisitor(ParseTreeVisitor):
# Visit a parse tree produced by ASLParser#state_machine.
def visitState_machine(self, ctx:ASLParser.State_machineContext):
return self.visitChildren(ctx)
File provider.py
has 816 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import copy
import datetime
import json
import logging
import re
File utils.py
has 806 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
import codecs
import datetime
import hashlib
import logging
S3Api
has 100 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class S3Api:
service = "s3"
version = "2006-03-01"
@handler("AbortMultipartUpload")
File provider_v2.py
has 796 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import datetime
import json
import logging
import threading
import uuid
Function _resolve_refs_recursively
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
Open
def _resolve_refs_recursively(
account_id: str,
region_name: str,
stack_name: str,
resources: dict,
- 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"