Showing 547 of 589 total issues
Function show_diff
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def show_diff( # noqa: PLR0913
Function test_filesystem
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_filesystem(
self,
M,
tmp_dir,
make_tmp_dir,
Function add_outs
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def add_outs(self, filter_info=None, allow_missing: bool = False, **kwargs):
from dvc.output import OutputDoesNotExistError
link_failures = []
old_versioned_outs = self.get_versioned_outs()
- 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 save
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def save(
cls,
info: "ExecutorInfo",
targets: Optional[Iterable[str]] = None,
recursive: 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 _changed_deps
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _changed_deps(
self, allow_missing: bool = False, upstream: Optional[list] = None
) -> bool:
for dep in self.deps:
status = dep.status()
- 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 rename
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def rename(
repo: "Repo",
new_name: str,
exp_name: Union[str, None] = None,
git_remote: 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 run_stage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def run_stage(stage, dry=False, force=False, run_env=None, **kwargs):
if not force:
if kwargs.get("pull") and not dry:
_pull_missing_deps(stage)
- 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 push
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def push( # noqa: PLR0913
self,
targets=None,
jobs=None,
remote=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 _get_update_diff_index
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _get_update_diff_index(
repo: "Repo",
out: "Output",
local_index: Union["DataIndex", "DataIndexView"],
remote_index: Union["DataIndex", "DataIndexView"],
- 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 _log_unversioned
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _log_unversioned(data: list["DataIndex"]) -> tuple[list["DataIndex"], int]:
ret: list[DataIndex] = []
unversioned: list[str] = []
for fs_index in data:
remote = fs_index.storage_map[()].remote
- 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 used_objs
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def used_objs( # noqa: PLR0913
self,
targets=None,
all_branches=False,
with_deps=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 reproduce_celery
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def reproduce_celery(
self, entries: Optional[Iterable["QueueEntry"]] = None, **kwargs
) -> dict[str, str]:
results: dict[str, str] = {}
if entries is 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 __init__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __init__( # noqa: PLR0915, PLR0913
self,
root_dir: Optional[str] = None,
fs: Optional["FileSystem"] = None,
rev: 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 _prepare_context
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _prepare_context(self, data: typing.Mapping) -> list[object]:
lines: list[object] = []
for index, error in enumerate(self.exc.errors):
if index and lines[-1]:
lines.append("")
- 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 _ast_tree_to_dict
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _ast_tree_to_dict(tree, only_self_params=False, lineno=False):
"""Parses ast trees to dict.
:param tree: ast.Tree
:param only_self_params: get only self params from class __init__ function
- 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_from_vars
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def load_from_vars(
self,
fs,
vars_: list,
wdir: 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 run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
try:
diff = self.repo.experiments.diff(
a_rev=self.args.a_rev,
b_rev=self.args.b_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 test_update
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_update(self, tmp_dir, dvc, remote_worktree):
(foo_stage,) = tmp_dir.dvc_gen("foo", "foo")
(data_dir_stage,) = tmp_dir.dvc_gen(
{
"data_dir": {
Function add_parser
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_parser(subparsers, parent_parser):
from dvc.commands.config import parent_config_parser
REMOTE_HELP = "Set up and manage data remotes."
remote_parser = subparsers.add_parser(
Function run
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def run( # noqa: C901, PLR0912