iterative/dvc

View on GitHub

Showing 101 of 233 total issues

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

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

    Avoid deeply nested control flow statements.
    Open

                            if not stage.locked:
                                G_active.add_node(dep_node, stage=dep_stage)
                                G_active.add_edge(node, dep_node)
    
    
    Severity: Major
    Found in dvc/repo/__init__.py - About 45 mins to fix

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

      def open(path, repo=None, rev=None, remote=None, mode="r", encoding=None):
      Severity: Minor
      Found in dvc/api.py - About 45 mins to fix

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

            def list_cache_paths(self):
                if not self.exists(self.path_info):
                    return []
        
                files = []
        Severity: Minor
        Found in dvc/remote/hdfs.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 _reproduce_stages has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        def _reproduce_stages(
            G, stages, node, downstream=False, ignore_build_cache=False, **kwargs
        ):
            r"""Derive the evaluation of the given node for the given graph.
        
        
        Severity: Minor
        Found in dvc/repo/reproduce.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 _read_metric has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _read_metric(fd, typ=None, xpath=None, fname=None, branch=None):
        Severity: Minor
        Found in dvc/repo/metrics/show.py - About 35 mins to fix

          Function status has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def status(
          Severity: Minor
          Found in dvc/remote/local/__init__.py - About 35 mins to fix

            Function _download has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _download(
            Severity: Minor
            Found in dvc/remote/oss.py - About 35 mins to fix

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

              def checkout(self, target=None, with_deps=False, force=False, recursive=False):
              Severity: Minor
              Found in dvc/repo/checkout.py - About 35 mins to fix

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

                def imp(self, url, path, out=None, rev=None):
                Severity: Minor
                Found in dvc/repo/imp.py - About 35 mins to fix

                  Function _download has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _download(
                  Severity: Minor
                  Found in dvc/remote/azure.py - About 35 mins to fix

                    Function _download has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def _download(
                    Severity: Minor
                    Found in dvc/remote/local/__init__.py - About 35 mins to fix

                      Function line has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def line(self, x0, y0, x1, y1, char):
                      Severity: Minor
                      Found in dvc/dagascii.py - About 35 mins to fix

                        Function dvc_walk has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def dvc_walk(top, dvcignore, topdown=True, onerror=None, followlinks=False):
                        Severity: Minor
                        Found in dvc/utils/__init__.py - About 35 mins to fix

                          Function _upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _upload(
                          Severity: Minor
                          Found in dvc/remote/azure.py - About 35 mins to fix

                            Function modify has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def modify(repo, path, typ=None, xpath=None, delete=False):
                            Severity: Minor
                            Found in dvc/repo/metrics/modify.py - About 35 mins to fix

                              Function _process has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def _process(
                              Severity: Minor
                              Found in dvc/remote/local/__init__.py - About 35 mins to fix

                                Function loads_from has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def loads_from(stage, s_list, use_cache=True, metric=False, persist=False):
                                Severity: Minor
                                Found in dvc/output/__init__.py - About 35 mins to fix

                                  Function _upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def _upload(
                                  Severity: Minor
                                  Found in dvc/remote/local/__init__.py - About 35 mins to fix

                                    Function _upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def _upload(
                                    Severity: Minor
                                    Found in dvc/remote/oss.py - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language