Showing 367 of 443 total issues
File output.py
has 879 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
from collections import defaultdict
from typing import TYPE_CHECKING, Dict, Optional, Set, Type
from urllib.parse import urlparse
File __init__.py
has 706 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
import re
from functools import wraps
from typing import Dict, Iterable, List, Mapping, Optional, Type
File base.py
has 594 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
import pickle
from abc import ABC, abstractmethod
from contextlib import contextmanager
File show.py
has 571 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import logging
import os
import re
from collections import Counter, OrderedDict, defaultdict
Output
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
class Output:
IS_DEPENDENCY = False
PARAM_PATH = "path"
PARAM_CACHE = "cache"
File context.py
has 436 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
from abc import ABC, abstractmethod
from collections import defaultdict
from collections.abc import Mapping, MutableMapping, MutableSequence, Sequence
File machine.py
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
from dvc.cli.command import CmdBase
from dvc.cli.utils import append_doc_link, fix_subparsers
from dvc.commands.config import CmdConfig
File stage.py
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
import fnmatch
import logging
import time
import typing
from contextlib import suppress
File compare.py
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
from collections import abc
from itertools import chain, repeat, zip_longest
from operator import itemgetter
from typing import (
TYPE_CHECKING,
Function _collect_experiment_commit
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def _collect_experiment_commit(
repo,
exp_rev,
stash=False,
sha_only=True,
- 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_rows
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def _collect_rows(
base_rev,
experiments,
all_headers,
metric_headers,
- 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
File dvc.py
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import ntpath
import os
import posixpath
import threading
File data_sync.py
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import logging
from dvc.cli import completion
from dvc.cli.command import CmdBase
File ignore.py
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
import re
from collections import namedtuple
from itertools import chain, groupby, takewhile
TabularData
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class TabularData(MutableSequence[Sequence["CellT"]]):
def __init__(self, columns: Sequence[str], fill_value: str = ""):
self._columns: Dict[str, Column] = {name: Column() for name in columns}
self._keys: List[str] = list(columns)
self._fill_value = fill_value
File plots.py
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import json
import logging
import os
File __init__.py
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
import logging
import os
from collections.abc import Mapping, Sequence
from copy import deepcopy
from typing import (
Function drop_duplicates
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def drop_duplicates(
self,
axis: str = "rows",
subset: Optional[Iterable[str]] = None,
ignore_empty: bool = True,
- 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 dropna
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def dropna(
self,
axis: str = "rows",
how="any",
subset: Optional[Iterable[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
File stage.py
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
import argparse
import logging
from itertools import chain, filterfalse
from typing import TYPE_CHECKING, Dict, Iterable, List