Showing 529 of 589 total issues
Avoid deeply nested control flow statements. Open
for field in val:
yield file, field
Function error_write
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def error_write(
Function push_refspec
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def push_refspec(
Function _resolve_definitions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _resolve_definitions(
Function add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add(
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update(self, name, **kwargs) -> tuple[Dataset, Dataset]:
dataset = self[name]
version = kwargs.get("version")
if dataset.type == "url" and (version or kwargs.get("rev")):
- 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 download
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def download(
Function worktree_view_by_remotes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def worktree_view_by_remotes(
index: "Index",
targets: Optional["TargetType"] = None,
push: bool = False,
**kwargs: Any,
- 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 collect_rev
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def collect_rev(
Function _collect_specific_target
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _collect_specific_target(
loader: "StageLoad",
target: str,
with_deps: bool,
recursive: bool,
- 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 _load_data_from_tree
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _load_data_from_tree(index, prefix, ws, key, tree, hash_name):
Function add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add(
Function _revisions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _revisions(repo, revs, experiment):
revisions = revs or []
if experiment and len(revisions) == 1:
baseline = repo.experiments.get_baseline(revisions[0])
if baseline:
- 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 _download_studio
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _download_studio(
repo_url: str,
name: str,
version: Optional[str] = None,
stage: Optional[str] = None,
- 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 _exp_range_rows
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _exp_range_rows(
Function _ls_tree
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _ls_tree(
fs, path, dvc_only: bool = False, maxdepth: Optional[int] = None, _info=None
):
ret = {}
info = _info or fs.info(path)
- 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 from_repo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def from_repo(
cls,
repo: "Repo",
rev: Optional[str] = None,
param_deps: 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 collect_active
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def collect_active(
repo: "Repo",
baseline_revs: Collection[str],
**kwargs,
) -> dict[str, list["ExpRange"]]:
- 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 targets_view
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def targets_view(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(