Showing 529 of 589 total issues
Function collect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def collect(
Function from_parts
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_parts(
Function _update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _update(
self,
dirname: str,
ignore_trie: Trie,
dnames: Optional["list"],
- 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_url
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_url(
Function make_dvc_bin
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_dvc_bin(
Function test_get
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_get(bench_dvc, tmp_dir, scm, dvc, make_dataset, remote):
Function _dump
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _dump(data, stream):
old_params = data[_PARAMS_KEY]
new_params = {
key: value
for key, value in data.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 __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function imp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def imp(
self,
url,
path,
out=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 add_remote
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_remote(self, *, url=None, config=None, name="upstream", default=True):
Function init
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def init(self, *, scm=False, dvc=False, subdir=False):
from dvc.repo import Repo
from dvc.scm import Git
assert not scm or not hasattr(self, "scm")
- 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 walk
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def walk(self, fs: "FileSystem", path: "AnyFSPath", **kwargs):
detail = kwargs.get("detail", False)
ignore_subrepos = kwargs.pop("ignore_subrepos", True)
if fs.protocol == Schemes.LOCAL:
for root, dirs, files in fs.walk(path, **kwargs):
- 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
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def resolve(
Function exp_show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def exp_show(
Function params_show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def params_show(
Function test_list
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_list(bench_dvc, tmp_dir, scm, dvc, make_dataset, remote):
Function load_from_vars
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_from_vars(
Function str_interpolate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def str_interpolate(
Function get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get(name: str) -> Union[DatachainDataset, DVCDataset, URLDataset]:
from difflib import get_close_matches
from dvc.fs import get_cloud_fs
from dvc.repo import Repo, datasets
- 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_import
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def test_import(bench_dvc, tmp_dir, scm, dvc, make_dataset, remote):