iterative/dvc

View on GitHub

Showing 112 of 260 total issues

Function download has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    def download(
        self,
        from_infos,
        to_infos,
        no_progress_bar=False,
Severity: Minor
Found in dvc/remote/gs.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 gc has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

def gc(
    self,
    all_branches=False,
    cloud=False,
    remote=None,
Severity: Minor
Found in dvc/repo/gc.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 download has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def download(
        self,
        from_infos,
        to_infos,
        no_progress_bar=False,
Severity: Minor
Found in dvc/remote/azure.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 _read_metrics has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def _read_metrics(repo, metrics, branch):
    """Read the content of each metric file and format it.

    Args:
        metrics (list): List of metric touples
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 execute has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def execute(self, cmd):
        stdin, stdout, stderr = self._ssh.exec_command(cmd)
        channel = stdout.channel

        stdin.close()
Severity: Minor
Found in dvc/remote/ssh/connection.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 download has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def download(
        self,
        from_infos,
        to_infos,
        names=None,
Severity: Minor
Found in dvc/remote/oss.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 save has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    def save(self):
        if not self.exists:
            raise self.DoesNotExistError(self)

        if not self.isfile and not self.isdir:
Severity: Minor
Found in dvc/output/base.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 upload has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def upload(self, from_infos, to_infos, names=None, no_progress_bar=False):
        names = self._verify_path_args(to_infos, from_infos, names)

        for from_info, to_info, name in zip(from_infos, to_infos, names):
            if to_info.scheme != self.scheme:
Severity: Minor
Found in dvc/remote/azure.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 upload has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    def upload(self, from_infos, to_infos, names=None, no_progress_bar=False):
        names = self._verify_path_args(to_infos, from_infos, names)

        for from_info, to_info, name in zip(from_infos, to_infos, names):
            if to_info.scheme != self.scheme:
Severity: Minor
Found in dvc/remote/oss.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 reproduce has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

    Function upload has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def upload(self, from_infos, to_infos, names=None, no_progress_bar=False):
            names = self._verify_path_args(to_infos, from_infos, names)
    
            gs = self.gs
    
    
    Severity: Minor
    Found in dvc/remote/gs.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 _walk has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        def _walk(
            self,
            tree,
            topdown=True,
            ignore_file_handler=None,
    Severity: Minor
    Found in dvc/scm/git/tree.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 __init__ has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Function upload has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def upload(self, from_infos, to_infos, names=None, no_progress_bar=False):
              names = self._verify_path_args(to_infos, from_infos, names)
      
              s3 = self.s3
      
      
      Severity: Minor
      Found in dvc/remote/s3.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 pull has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

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

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

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

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

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

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

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

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

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

                def fetch(
                Severity: Major
                Found in dvc/repo/fetch.py - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language