iterative/dvc

View on GitHub

Showing 517 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 run has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

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

      def draw(vertices, edges):
          """Build a DAG and draw it in ASCII.
      
          Args:
              vertices (list): list of graph vertices.
      Severity: Minor
      Found in dvc/dagascii.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/local.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 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

            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 save has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def save(
            Severity: Minor
            Found in dvc/repo/experiments/executor/base.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 fill_from_lock has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def fill_from_lock(stage, lock_data=None):
                        """Fill values for params, checksums for outs and deps from lock."""
                        if not lock_data:
                            return
                
                
                Severity: Minor
                Found in dvc/stage/loader.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 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 error_write has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

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

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

                        def _dumpd(item: "Output"):
                            if isinstance(item, DatasetDependency):
                                return item.dumpd()
                    
                            ret: dict[str, Any] = {item.PARAM_PATH: item.def_path}
                    Severity: Minor
                    Found in dvc/stage/serialize.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 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def __init__(self, name: str, path: str, fs: "FileSystem", *, index=None, **config):
                    Severity: Minor
                    Found in dvc/data_cloud.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 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 from_repo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def from_repo(
                                  cls,
                                  repo: "Repo",
                                  rev: Optional[str] = None,
                                  param_deps: bool = False,
                          Severity: Minor
                          Found in dvc/repo/experiments/serialize.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 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 _add_transfer has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

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

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

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