Showing 3,177 of 3,177 total issues
Avoid too many return
statements within this function. Open
return azs
Avoid too many return
statements within this function. Open
return "elbv2"
Avoid too many return
statements within this function. Open
return "resource-groups"
Avoid too many return
statements within this function. Open
return "application-autoscaling"
Avoid too many return
statements within this function. Open
return "es"
Avoid too many return
statements within this function. Open
return "kafka"
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return "acm"
Avoid too many return
statements within this function. Open
return "timestream-write"
Avoid too many return
statements within this function. Open
return format_name_to_path(handler_name, ".", ".py")
Avoid too many return
statements within this function. Open
return "opensearch"
Avoid too many return
statements within this function. Open
return "elb"
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return format_name_to_path(handler_name, ".", ".rb")
Avoid too many return
statements within this function. Open
return parts[1].lower()
Avoid too many return
statements within this function. Open
return None
Function __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
mount: str = None,
submount: str | None = _default,
subdomain: str | None = _default,
- 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 pytest_sessionstart
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def pytest_sessionstart(session: "Session") -> None:
Path(BASE_PATH).mkdir(parents=True, exist_ok=True)
pattern = re.compile("--junitxml=(.*)\\.xml")
if session.config.invocation_params:
for ip in session.config.invocation_params.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 fetch_events
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fetch_events(role_arn: str, start_time: str, end_time: str) -> List[dict]:
print(f"fetching cloudtrail events for role {role_arn} from {start_time=} to {end_time=}")
client = get_client("cloudtrail")
paginator = client.get_paginator("lookup_events")
- 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"