Function _collect_vars
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def _collect_vars(repo, params) -> Dict:
from dvc.fs.git import GitFileSystem
vars_params: Dict[str, Dict] = defaultdict(dict)
rel_to_root = relpath(repo.root_dir)
- 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 _read_params
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _read_params(
repo,
params,
params_fs_paths,
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 show
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Wontfix
def show(repo, revs=None, targets=None, deps=False, onerror: Callable = None):
if onerror is None:
onerror = onerror_collect
res = {}
- 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 _read_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _read_params(
Function _gather_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _gather_params(repo, rev, targets=None, deps=False, onerror=None):
Function show
has 5 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
def show(repo, revs=None, targets=None, deps=False, onerror: Callable = None):