Showing 547 of 589 total issues
Function _get_done_result
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _get_done_result(
self, entry: QueueEntry, timeout: Optional[float] = None
) -> Optional["ExecutorResult"]:
from celery.exceptions import TimeoutError as _CeleryTimeout
- 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 show
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def show(
repo: "Repo",
targets: Optional[list[str]] = None,
stages: Optional[list[str]] = None,
outs_only: 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 _rebuild
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _rebuild(idx, path, fs, cb):
from dvc_data.index import DataIndex, DataIndexEntry, Meta
new = DataIndex()
items = list(idx.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"
Further reading
Function find_root
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_root(cls, root=None, fs=None) -> str:
from dvc.fs import LocalFileSystem, localfs
fs = fs or localfs
root = root or os.curdir
- 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
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def collect(
repo: "Repo",
revs: Union[list[str], str, None] = None,
all_branches: bool = False,
all_tags: 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 test_init
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def test_init(bench_dvc, tmp_dir, scm):
def _cleanup_dir():
for item in tmp_dir.iterdir():
if item.is_dir():
if item.name != ".git":
- 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_rev
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resolve_rev(scm: Union["Git", "NoSCM"], rev: str) -> str:
from scmrepo.exceptions import RevError as InternalRevError
from dvc.repo.experiments.utils import fix_exp_head
- 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 group_definitions_by_id
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def group_definitions_by_id(
definitions: dict[str, dict],
) -> dict[str, tuple[str, dict]]:
"""
Format ID and extracts plot_definition for each plot.
- 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 _collapse_widths
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _collapse_widths( # type: ignore[override]
self,
widths: list[int],
wrapable: list[bool],
max_width: int,
- 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 check_missing
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def check_missing(repo, rev=None, max_size=None, types=None):
from dvc_data.index import StorageKeyError
with repo.switch(rev or "workspace"):
idx = repo.index.targets_view(None, max_size=max_size, types=types)
- 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 _merge_data
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _merge_data(s_list):
d: dict[str, dict] = defaultdict(dict)
for key in s_list:
if isinstance(key, str):
d[key].update({})
- 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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def download(
fs: "FileSystem", fs_path: str, to: str, jobs: Optional[int] = None
) -> list[tuple[str, str, Optional[dict]]]:
from dvc.scm import lfs_prefetch
- 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 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove( # noqa: C901, PLR0912
Function write
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(
Function _diff
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _diff(
Consider simplifying this complex logical expression. Open
if (
_remote
and (_remote.worktree or _remote.fs.version_aware)
and (revs or all_branches or all_tags or all_commits)
):
Function _download_studio
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _download_studio(
Function imp_db
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def imp_db(
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function ls_tree
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def ls_tree(