Showing 517 of 578 total issues
Function push_refspec
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def push_refspec(
scm: "Git",
url: str,
push_list=list[tuple[Optional[str], str]],
force: 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 create
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create(
self,
single_stage: bool = False,
validate: bool = True,
fname: 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 collect
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def collect(
Function make_tmp_dir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def make_tmp_dir(tmp_path_factory, request, worker_id):
def make(name, *, scm=False, dvc=False, subdir=False):
from shutil import copytree, ignore_patterns
from dvc.repo import Repo
- 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 __new__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def __new__(cls, *args, **kwargs):
if cls is TmpDir:
cls = WindowsTmpDir if os.name == "nt" else PosixTmpDir
# init parameter and `_init` method has been removed in Python 3.10.
- 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_n_commits
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _get_n_commits(scm: "Git", revs: list[str], num: int) -> list[str]:
results = []
for rev in revs:
if num == 0:
continue
- 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 _postprocess
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _postprocess(exp_rows):
for exp_row in exp_rows:
for k, v in exp_row.items():
if isinstance(v, Text):
v_str = str(v)
- 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 du
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def du(self, path, total=True, maxdepth=None, withdirs=False, **kwargs):
if maxdepth is not None:
raise NotImplementedError
sizes = {}
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, repo):
self._repo = repo
self.config = config = repo.config["cache"]
self._odb = {}
- 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 diff_table
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def diff_table(
Function test_file
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_file(self, tmp_dir, dvc, run_copy, remote_version_aware):
(stage,) = tmp_dir.dvc_gen("foo", "foo")
run_copy("foo", "foo_copy", name="copy")
assert dvc.push()
Function __init__
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__( # noqa: PLR0913
self,
stage,
path,
info=None,
Function add_parser
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_parser(subparsers, parent_parser):
PLOTS_HELP = "Commands to visualize and compare plot data."
plots_parser = subparsers.add_parser(
"plots",
Function push
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def push(
Function reproduce
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def reproduce(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function table
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def table(
Function update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def update( # noqa: C901
Function from_parts
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_parts(
Function get
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def get(