iterative/dvc

View on GitHub

Showing 529 of 589 total issues

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

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

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

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

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

      def read_param_file(
          fs: "FileSystem",
          path: str,
          key_paths: Optional[list[str]] = None,
          flatten: bool = False,
      Severity: Minor
      Found in dvc/dependency/param.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_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 update_git has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            def update_git(self, event: "GitProgressEvent") -> None:
                phase, completed, total, message, *_ = event
                if phase:
                    message = (phase + " | " + message) if message else phase
                if message:
        Severity: Minor
        Found in dvc/scm.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_str has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def resolve_str(
        Severity: Minor
        Found in dvc/parsing/context.py - About 45 mins to fix

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

              def download(self, to: "Output", jobs: Optional[int] = None):
                  from dvc.fs import LocalFileSystem
          
                  files = super().download(to=to, jobs=jobs)
                  if not isinstance(to.fs, LocalFileSystem):
          Severity: Minor
          Found in dvc/dependency/repo.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 transfer has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def transfer(
          Severity: Minor
          Found in dvc/output.py - About 45 mins to fix

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

            def _get_odb(
            Severity: Minor
            Found in dvc/cachemgr.py - About 45 mins to fix

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

                  def _show_results(self, result):
                      if not result.match and not self.args.non_matching:
                          return
              
                      if self.args.details:
              Severity: Minor
              Found in dvc/commands/check_ignore.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 _get has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def _get(
              Severity: Minor
              Found in dvc/fs/dvc.py - About 45 mins to fix

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

                def debugtools(args: Optional["Namespace"] = None, **kwargs):
                    kw = vars(args) if args else {}
                    kw.update(kwargs)
                
                    with ExitStack() as stack:
                Severity: Minor
                Found in dvc/_debug.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 run has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def run(self):
                        from dvc.repo.experiments.show import tabulate
                
                        try:
                            exps = self.repo.experiments.show(
                Severity: Minor
                Found in dvc/commands/experiments/show.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 display has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def display(cls, name: str, dataset: "Dataset", action: str = "Adding"):
                        from dvc.ui import ui
                
                        assert dataset.lock
                
                
                Severity: Minor
                Found in dvc/commands/dataset.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 get has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def get(
                Severity: Minor
                Found in dvc/fs/dvc.py - About 45 mins to fix

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

                      def run(self):
                          from dvc.exceptions import InvalidArgumentError
                          from dvc_render.vega_templates import TEMPLATES
                  
                          try:
                  Severity: Minor
                  Found in dvc/commands/plots.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 _show has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def _show(self, status, indent=0):
                          ind = indent * self.STATUS_INDENT
                  
                          if isinstance(status, str):
                              ui.write(f"{ind}{status}")
                  Severity: Minor
                  Found in dvc/commands/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 checkout has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def checkout(
                          self,
                          force: bool = False,
                          progress_callback: "Callback" = DEFAULT_CALLBACK,
                          relink: bool = False,
                  Severity: Minor
                  Found in dvc/output.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 metrics_table has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def metrics_table(
                  Severity: Minor
                  Found in dvc/compare.py - About 45 mins to fix

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

                    def _find_parser(parser, cmd_cls):
                        defaults = parser._defaults
                        if not cmd_cls or cmd_cls == defaults.get("func"):
                            parser.print_help()
                            raise DvcParserError
                    Severity: Minor
                    Found in dvc/cli/parser.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

                    Severity
                    Category
                    Status
                    Source
                    Language