Showing 3,157 of 3,157 total issues
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"
Further reading
File docker_sdk_client.py
has 787 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
import json
import logging
import os
import queue
File preprocessor.py
has 786 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
from typing import Optional
from antlr4 import ParserRuleContext
from antlr4.tree.Tree import ParseTree, TerminalNodeImpl
File __init__.py
has 764 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
ASLParser
has 94 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ASLParser ( Parser ):
grammarFileName = "ASLParser.g4"
atn = ATNDeserializer().deserialize(serializedATN())
File docker_cmd_client.py
has 763 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import functools
import itertools
import json
import logging
import os
File provider.py
has 762 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from datetime import datetime, timezone
from moto.route53resolver.models import Route53ResolverBackend as MotoRoute53ResolverBackend
from moto.route53resolver.models import route53resolver_backends
File __init__.py
has 760 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from datetime import datetime
from typing import Dict, Iterator, List, Optional, TypedDict
from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
S3ControlApi
has 92 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class S3ControlApi:
service = "s3control"
version = "2018-08-20"
@handler("AssociateAccessGrantsIdentityCenter")
ConfigApi
has 92 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ConfigApi:
service = "config"
version = "2014-11-12"
@handler("BatchGetAggregateResourceConfig")
File server.py
has 746 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import argparse
import copy
import logging
import os
import re
File notifications.py
has 720 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from __future__ import annotations
import datetime
import json
import logging
File provider.py
has 716 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from __future__ import annotations
import json
import logging
import re
File localstack.py
has 709 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import logging
import os
import sys
import traceback
File transformer_utility.py
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import logging
import re
from datetime import datetime
from json import JSONDecodeError
File presigned_url.py
has 682 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
import copy
import datetime
import json
import logging
CloudformationApi
has 82 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class CloudformationApi:
service = "cloudformation"
version = "2010-05-15"
@handler("ActivateOrganizationsAccess")
File __main__.py
has 661 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from __future__ import annotations
import json
import os
import zipfile
File provider.py
has 651 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import base64
import json
import logging
from datetime import datetime, timezone
from typing import Callable, Optional
Function resolve_dependencies
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
Open
def resolve_dependencies(d: dict, evaluated_conditions: dict[str, bool]) -> set[str]:
items = set()
if isinstance(d, dict):
for k, v in d.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"