iterative/dvc

View on GitHub

Showing 547 of 589 total issues

Function _data_cells has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

    Function write_json has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Function show has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

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

        def ls(
            repo,
            rev: Optional[Union[list[str], str]] = None,
            all_commits: bool = False,
            num: int = 1,
        Severity: Minor
        Found in dvc/repo/experiments/ls.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 _can_hash has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def _can_hash(stage):
            if stage.is_callback or stage.always_changed:
                return False
        
            if not all([stage.cmd, stage.deps, stage.outs]):
        Severity: Minor
        Found in dvc/stage/cache.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 emit has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def emit(self, record):
                """Write to Tqdm's stream so as to not break progress-bars"""
                try:
                    if record.exc_info:
                        _, exc, *_ = record.exc_info
        Severity: Minor
        Found in dvc/logger.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(  # noqa: C901
        Severity: Major
        Found in dvc/repo/experiments/pull.py - About 1 hr to fix

          Function table has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

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

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

            def push_refspec(
                scm: "Git",
                url: str,
                push_list=list[tuple[Optional[str], str]],
                force: bool = False,
            Severity: Minor
            Found in dvc/repo/experiments/utils.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 create has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                def create(
                    self,
                    single_stage: bool = False,
                    validate: bool = True,
                    fname: Optional[str] = None,
            Severity: Minor
            Found in dvc/repo/stage.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 collect_queued has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

            def collect_queued(
                repo: "Repo",
                baseline_revs: Collection[str],
                **kwargs,
            ) -> dict[str, list["ExpRange"]]:
            Severity: Minor
            Found in dvc/repo/experiments/collect.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 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

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

              Function get has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

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

                Function collect has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

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

                  Function brancher has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

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

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

                        def get(
                            cls,
                            url: str,
                            name: str,
                            version: Optional[str] = None,
                    Severity: Minor
                    Found in dvc/repo/artifacts.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 show has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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

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

                              def __new__(cls, *args, **kwargs):
                                  if cls is TmpDir:
                                      cls = WindowsTmpDir if os.name == "nt" else PosixTmpDir  # noqa: PLW0642
                      
                                  # init parameter and `_init` method has been removed in Python 3.10.
                      Severity: Minor
                      Found in dvc/testing/tmp_dir.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 _postprocess has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def _postprocess(exp_rows):
                          for exp_row in exp_rows:
                              for k, v in exp_row.items():
                                  if isinstance(v, Text):
                                      v_str = str(v)
                      Severity: Minor
                      Found in dvc/api/experiments.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 _get_n_commits has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def _get_n_commits(scm: "Git", revs: list[str], num: int) -> list[str]:
                          results = []
                          for rev in revs:
                              if num == 0:
                                  continue
                      Severity: Minor
                      Found in dvc/scm.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

                      Severity
                      Category
                      Status
                      Source
                      Language