Function _resolve_exp_by_name
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _resolve_exp_by_name(
repo: "Repo",
exp_names: Union[str, List[str]],
commit_ref_dict: Dict["ExpRefInfo", str],
queued_ref_dict: Dict[int, str],
- 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 _get_queued_index_by_names
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _get_queued_index_by_names(
repo,
exp_name_set: Set[str],
) -> Mapping[str, Optional[int]]:
from scmrepo.exceptions import RevError as InternalRevError
- 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 remove
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove(
Function _resolve_exp_by_name
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _resolve_exp_by_name(
Function _resolve_exp_by_baseline
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _resolve_exp_by_baseline(
Function remove
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def remove(
repo: "Repo",
exp_names: Union[None, str, List[str]] = None,
rev: Optional[str] = None,
all_commits: bool = False,
- 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 _resolve_exp_by_baseline
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _resolve_exp_by_baseline(
repo,
rev: str,
num: int,
commit_ref_dict: Dict["ExpRefInfo", str],
- 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"