iterative/dvc

View on GitHub

Showing 479 of 539 total issues

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

def _dump_data(
Severity: Minor
Found in dvc/utils/serialize/_common.py - About 35 mins to fix

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

        def __init__(
    Severity: Minor
    Found in dvc/fs/git.py - About 35 mins to fix

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

          def _fill_parts(self, scheme, host, user, port, path):
      Severity: Minor
      Found in dvc/testing/path_info.py - About 35 mins to fix

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

            def add_remote(self, *, url=None, config=None, name="upstream", default=True):
        Severity: Minor
        Found in dvc/testing/tmp_dir.py - About 35 mins to fix

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

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

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

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

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

                  def _collapse_widths(  # type: ignore[override]
              Severity: Minor
              Found in dvc/utils/table.py - About 35 mins to fix

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

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

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

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

                    Function _get_names has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def _get_names(entries: Iterable[Union["QueueEntry", "QueueDoneResult"]]):
                        names: List[str] = []
                        for entry in entries:
                            if isinstance(entry, QueueDoneResult):
                                if entry.result and entry.result.ref_info:
                    Severity: Minor
                    Found in dvc/repo/experiments/queue/remove.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_pager has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def find_pager():
                        if not sys.stdout.isatty():
                            return None
                    
                        # pylint: disable=redefined-outer-name
                    Severity: Minor
                    Found in dvc/ui/pager.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 logs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def logs(
                            self,
                            rev: str,
                            encoding: Optional[str] = None,
                            follow: bool = False,
                    Severity: Minor
                    Found in dvc/repo/experiments/queue/celery.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 prompt has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def prompt(
                            self,
                            text: str,
                            choices: Optional[Iterable[str]] = None,
                            password: bool = False,
                    Severity: Minor
                    Found in dvc/ui/__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 transfer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def transfer(self, from_odb, to_odb):
                            from dvc.fs import HTTPFileSystem, LocalFileSystem
                            from dvc.fs.callbacks import Callback
                    
                            from_fs = from_odb.fs
                    Severity: Minor
                    Found in dvc/stage/cache.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 status has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def status(self) -> List[Dict[str, Any]]:
                            """Show the status of exp tasks in queue"""
                            from datetime import datetime
                    
                            result: List[Dict[str, Optional[str]]] = []
                    Severity: Minor
                    Found in dvc/repo/experiments/queue/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 make_prompt has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def make_prompt(self, default):
                            prompt = self.prompt.copy()
                            prompt.end = ""
                    
                            parts = []
                    Severity: Minor
                    Found in dvc/ui/prompt.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 rich_table has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def rich_table(
                        ui: "Console",
                        data: TableData,
                        headers: Optional[Headers] = None,
                        pager: bool = False,
                    Severity: Minor
                    Found in dvc/ui/table.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 gc has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def gc(
                        repo,
                        all_branches: Optional[bool] = False,
                        all_tags: Optional[bool] = False,
                        all_commits: Optional[bool] = False,
                    Severity: Minor
                    Found in dvc/repo/experiments/gc.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 init_git has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def init_git(
                            self,
                            repo: "Repo",
                            scm: "Git",
                            stash_rev: str,
                    Severity: Minor
                    Found in dvc/repo/experiments/executor/local.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 reproduce has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def reproduce(self, interactive=False, **kwargs) -> Optional["Stage"]:
                            if not (kwargs.get("force", False) or self.changed()):
                                if not isinstance(self, PipelineStage) and self.is_data_source:
                                    logger.info("'%s' didn't change, skipping", self.addressing)
                                else:
                    Severity: Minor
                    Found in dvc/stage/__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

                    Severity
                    Category
                    Status
                    Source
                    Language