Showing 547 of 589 total issues
Function _stash_exp
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _stash_exp(
Function _dumpd
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _dumpd(item: "Output"):
if isinstance(item, DatasetDependency):
return item.dumpd()
ret: dict[str, Any] = {item.PARAM_PATH: item.def_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 add_logging_level
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def add_logging_level(level_name, level_num, method_name=None):
"""
Adds a new logging level to the `logging` module and the
currently configured logging class.
- 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
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def diff(repo, *args, a_rev=None, b_rev=None, param_deps=False, **kwargs):
Function init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def init_git(
Function fill_from_lock
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fill_from_lock(stage, lock_data=None):
"""Fill values for params, checksums for outs and deps from lock."""
if not lock_data:
return
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def run(
Function fill_stage_dependencies
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fill_stage_dependencies(
Function rwlock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rwlock(tmp_dir, fs, cmd, read, write, hardlink):
Function save_outs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def save_outs(self, allow_missing: bool = False):
from dvc.output import OutputDoesNotExistError
old_versioned_outs = self.get_versioned_outs()
for out in self.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 _cloud_status
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _cloud_status(
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 init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def init_git(
Function init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def init_git(
Function draw
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def draw(vertices, edges):
"""Build a DAG and draw it in ASCII.
Args:
vertices (list): list of graph vertices.
- 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
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"