iterative/dvc

View on GitHub

Showing 536 of 578 total issues

Avoid deeply nested control flow statements.
Open

                    for field in val:
                        yield file, field

Severity: Major
Found in dvc/render/converter/vega.py - About 45 mins to fix

    Function plain_table has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def plain_table(
    Severity: Minor
    Found in dvc/ui/table.py - About 45 mins to fix

      Function commit has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def commit(
      Severity: Minor
      Found in dvc/repo/experiments/executor/base.py - About 45 mins to fix

        Function _check_blockers has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _check_blockers(tmp_dir, lock, info, *, mode, waiters):  # noqa: C901, PLR0912
        Severity: Minor
        Found in dvc/rwlock.py - About 45 mins to fix

          Function rwlock has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def rwlock(tmp_dir, fs, cmd, read, write, hardlink):
          Severity: Minor
          Found in dvc/rwlock.py - About 45 mins to fix

            Function init_git has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def init_git(
            Severity: Minor
            Found in dvc/repo/experiments/executor/local.py - About 45 mins to fix

              Function fill_stage_dependencies has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def fill_stage_dependencies(
              Severity: Minor
              Found in dvc/stage/utils.py - About 45 mins to fix

                Function prepare_default_pager has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def prepare_default_pager(
                Severity: Minor
                Found in dvc/ui/pager.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if last_rev:
                                              result[last_rev] = info.asdict()
                              except (InvalidRemoteSCMRepo, SCMError):
                  Severity: Major
                  Found in dvc/repo/experiments/queue/utils.py - About 45 mins to fix

                    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,
                    Severity: Minor
                    Found in dvc/repo/status.py - About 45 mins 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 init_git has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def init_git(
                    Severity: Minor
                    Found in dvc/repo/experiments/executor/base.py - About 45 mins to fix

                      Function push_refspec has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def push_refspec(
                      Severity: Minor
                      Found in dvc/repo/experiments/utils.py - About 45 mins to fix

                        Function download has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def download(
                        Severity: Minor
                        Found in dvc/repo/artifacts.py - About 45 mins to fix

                          Function _load_data_from_tree has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def _load_data_from_tree(index, prefix, ws, key, tree, hash_name):
                          Severity: Minor
                          Found in dvc/repo/index.py - About 45 mins to fix

                            Function _collect_specific_target has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def _collect_specific_target(
                                loader: "StageLoad",
                                target: str,
                                with_deps: bool,
                                recursive: bool,
                            Severity: Minor
                            Found in dvc/repo/stage.py - About 45 mins 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 _download_studio has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def _download_studio(
                                    repo_url: str,
                                    name: str,
                                    version: Optional[str] = None,
                                    stage: Optional[str] = None,
                            Severity: Minor
                            Found in dvc/repo/artifacts.py - About 45 mins 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 __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(  # noqa: PLR0915, PLR0913
                                    self,
                                    root_dir: Optional[str] = None,
                                    fs: Optional["FileSystem"] = None,
                                    rev: Optional[str] = None,
                            Severity: Minor
                            Found in dvc/repo/__init__.py - About 45 mins 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_definitions has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def _resolve_definitions(
                            Severity: Minor
                            Found in dvc/repo/plots/__init__.py - About 45 mins to fix

                              Function collect_active has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def collect_active(
                                  repo: "Repo",
                                  baseline_revs: Collection[str],
                                  **kwargs,
                              ) -> dict[str, list["ExpRange"]]:
                              Severity: Minor
                              Found in dvc/repo/experiments/collect.py - About 45 mins 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 add has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def add(
                              Severity: Minor
                              Found in dvc/repo/stage.py - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language