iterative/dvc

View on GitHub

Showing 536 of 578 total issues

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

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

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

        def from_parts(
    Severity: Minor
    Found in dvc/testing/path_info.py - About 45 mins to fix

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

      def test_list(bench_dvc, tmp_dir, scm, dvc, make_dataset, remote):
      Severity: Minor
      Found in dvc/testing/benchmarks/cli/commands/test_ls.py - About 45 mins to fix

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

        def params_show(
        Severity: Minor
        Found in dvc/api/show.py - About 45 mins to fix

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

          def test_get(bench_dvc, tmp_dir, scm, dvc, make_dataset, remote):
          Severity: Minor
          Found in dvc/testing/benchmarks/cli/commands/test_get.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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

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

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

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

                def get(name: str) -> Union[DVCXDataset, DVCDataset, URLDataset]:
                    from difflib import get_close_matches
                
                    from dvc.fs import get_cloud_fs
                    from dvc.repo import Repo, datasets
                Severity: Minor
                Found in dvc/api/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 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 _update has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def _update(
                        self,
                        dirname: str,
                        ignore_trie: Trie,
                        dnames: Optional["list"],
                Severity: Minor
                Found in dvc/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 walk has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    def walk(self, fs: "FileSystem", path: "AnyFSPath", **kwargs):
                        detail = kwargs.get("detail", False)
                        ignore_subrepos = kwargs.pop("ignore_subrepos", True)
                        if fs.protocol == Schemes.LOCAL:
                            for root, dirs, files in fs.walk(path, **kwargs):
                Severity: Minor
                Found in dvc/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 imp has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                def imp(
                    self,
                    url,
                    path,
                    out=None,
                Severity: Minor
                Found in dvc/repo/imp.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 exp_show has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def exp_show(
                Severity: Minor
                Found in dvc/api/experiments.py - About 45 mins to fix

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

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

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

                    def _log_exceptions(exc: Exception) -> Optional[int]:
                        """Try to log some known exceptions, that are not DVCExceptions."""
                        from dvc.utils import error_link, format_link
                    
                        if isinstance(exc, OSError):
                    Severity: Minor
                    Found in dvc/cli/__init__.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_obj has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_obj(
                            self, filter_info: Optional[str] = None, **kwargs
                        ) -> Optional["HashFile"]:
                            obj: Optional["HashFile"] = None
                            if self.obj:
                    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 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 _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 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
                        Severity
                        Category
                        Status
                        Source
                        Language