iterative/dvc

View on GitHub

Showing 112 of 260 total issues

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 _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 _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 _checkout has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _checkout(
        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 _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 _upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def _upload(
                Severity: Minor
                Found in dvc/remote/local.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

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

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

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

                            def _checkout_file(
                        Severity: Minor
                        Found in dvc/remote/base.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 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 slow_link_guard has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def slow_link_guard(f):
                                  @wraps(f)
                                  def wrapper(remote, *args, **kwargs):
                                      if this.already_displayed:
                                          return f(remote, *args, **kwargs)
                              Severity: Minor
                              Found in dvc/remote/slow_link_detection.py - About 35 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 _fetch has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def _fetch(
                                  self,
                                  targets=None,
                                  jobs=None,
                                  remote=None,
                              Severity: Minor
                              Found in dvc/repo/fetch.py - About 35 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 find_root has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def find_root(cls, root=None):
                                      if root is None:
                                          root = os.getcwd()
                                      else:
                                          root = os.path.abspath(os.path.realpath(root))
                              Severity: Minor
                              Found in dvc/repo/__init__.py - About 35 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 get_checksum has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def get_checksum(self, path_info):
                                      if not self.exists(path_info):
                                          return None
                              
                                      checksum = self.state.get(path_info)
                              Severity: Minor
                              Found in dvc/remote/base.py - About 35 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 find_outs_by_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def find_outs_by_path(self, path, outs=None, recursive=False):
                                      if not outs:
                                          outs = [out for stage in self.stages for out in stage.outs]
                              
                                      abs_path = os.path.abspath(path)
                              Severity: Minor
                              Found in dvc/repo/__init__.py - About 35 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 run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def run(self):
                                      indent = 1 if self.args.cloud else 0
                                      try:
                                          st = self.repo.status(
                                              targets=self.args.targets,
                              Severity: Minor
                              Found in dvc/command/status.py - About 35 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

                              Severity
                              Category
                              Status
                              Source
                              Language