iterative/dvc

View on GitHub

Showing 529 of 589 total issues

Function ls has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def ls(
Severity: Major
Found in dvc/repo/ls.py - About 1 hr to fix

    Function imp has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def imp(
    Severity: Major
    Found in dvc/repo/imp.py - About 1 hr to fix

      Function checkout has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def checkout(  # noqa: C901
      Severity: Major
      Found in dvc/repo/checkout.py - About 1 hr to fix

        Function update has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def update(  # noqa: C901
        Severity: Major
        Found in dvc/repo/update.py - About 1 hr to fix

          Function open has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def open(  # noqa: A001
          Severity: Major
          Found in dvc/api/data.py - About 1 hr to fix

            Function from_parts has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def from_parts(
            Severity: Major
            Found in dvc/testing/path_info.py - About 1 hr to fix

              Function get has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def get(
              Severity: Major
              Found in dvc/repo/get.py - About 1 hr to fix

                Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Major
                Found in dvc/fs/callbacks.py - About 1 hr to fix

                  Function sync_import has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def sync_import(stage, dry=False, force=False, jobs=None, no_download=False):
                      """Synchronize import's outs to the workspace."""
                      logger.info("Importing '%s' -> '%s'", stage.deps[0], stage.outs[0])
                      if dry:
                          return
                  Severity: Minor
                  Found in dvc/stage/imports.py - About 1 hr to fix

                  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 _mark_inactive_tasks_failure has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _mark_inactive_tasks_failure(
                          self, remained_entries: dict[QueueEntry, str]
                      ) -> None:
                          remained_revs: list[str] = []
                          running_ids = self._get_running_task_ids()
                  Severity: Minor
                  Found in dvc/repo/experiments/queue/celery.py - About 1 hr to fix

                  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_done_result has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _get_done_result(
                          self, entry: QueueEntry, timeout: Optional[float] = None
                      ) -> Optional["ExecutorResult"]:
                          from celery.exceptions import TimeoutError as _CeleryTimeout
                  
                  
                  Severity: Minor
                  Found in dvc/repo/experiments/queue/celery.py - About 1 hr to fix

                  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 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def show(
                      repo: "Repo",
                      targets: Optional[list[str]] = None,
                      stages: Optional[list[str]] = None,
                      outs_only: bool = False,
                  Severity: Minor
                  Found in dvc/repo/metrics/show.py - About 1 hr to fix

                  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 _rebuild has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def _rebuild(idx, path, fs, cb):
                      from dvc_data.index import DataIndex, DataIndexEntry, Meta
                  
                      new = DataIndex()
                      items = list(idx.items())
                  Severity: Minor
                  Found in dvc/repo/push.py - About 1 hr to fix

                  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 find_root has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def find_root(cls, root=None, fs=None) -> str:
                          from dvc.fs import LocalFileSystem, localfs
                  
                          fs = fs or localfs
                          root = root or os.curdir
                  Severity: Minor
                  Found in dvc/repo/__init__.py - About 1 hr to fix

                  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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def collect(
                      repo: "Repo",
                      revs: Union[list[str], str, None] = None,
                      all_branches: bool = False,
                      all_tags: bool = False,
                  Severity: Minor
                  Found in dvc/repo/experiments/collect.py - About 1 hr to fix

                  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_init has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def test_init(bench_dvc, tmp_dir, scm):
                      def _cleanup_dir():
                          for item in tmp_dir.iterdir():
                              if item.is_dir():
                                  if item.name != ".git":
                  Severity: Minor
                  Found in dvc/testing/benchmarks/cli/commands/test_init.py - About 1 hr to fix

                  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_rev has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def resolve_rev(scm: Union["Git", "NoSCM"], rev: str) -> str:
                      from scmrepo.exceptions import RevError as InternalRevError
                  
                      from dvc.repo.experiments.utils import fix_exp_head
                  
                  
                  Severity: Minor
                  Found in dvc/scm.py - About 1 hr to fix

                  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 group_definitions_by_id has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def group_definitions_by_id(
                      definitions: dict[str, dict],
                  ) -> dict[str, tuple[str, dict]]:
                      """
                      Format ID and extracts plot_definition for each plot.
                  Severity: Minor
                  Found in dvc/utils/plots.py - About 1 hr to fix

                  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 _collapse_widths has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _collapse_widths(  # type: ignore[override]
                          self,
                          widths: list[int],
                          wrapable: list[bool],
                          max_width: int,
                  Severity: Minor
                  Found in dvc/utils/table.py - About 1 hr to fix

                  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 check_missing has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def check_missing(repo, rev=None, max_size=None, types=None):
                      from dvc_data.index import StorageKeyError
                  
                      with repo.switch(rev or "workspace"):
                          idx = repo.index.targets_view(None, max_size=max_size, types=types)
                  Severity: Minor
                  Found in dvc/repo/cache.py - About 1 hr to fix

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language