iterative/dvc

View on GitHub

Showing 142 of 234 total issues

Similar blocks of code found in 7 locations. Consider refactoring.
Open

    remote_default_parser = remote_subparsers.add_parser(
        "default",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(REMOTE_DEFAULT_HELP, "remote/default"),
        help=REMOTE_DEFAULT_HELP,
Severity: Major
Found in dvc/command/remote.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 44..49
dvc/command/config.py on lines 62..67
dvc/command/remote.py on lines 85..90
dvc/command/remote.py on lines 134..139
dvc/command/remote.py on lines 147..152
dvc/command/remote.py on lines 171..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

    remote_remove_parser = remote_subparsers.add_parser(
        "remove",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(REMOTE_REMOVE_HELP, "remote/remove"),
        help=REMOTE_REMOVE_HELP,
Severity: Major
Found in dvc/command/remote.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 44..49
dvc/command/config.py on lines 62..67
dvc/command/remote.py on lines 85..90
dvc/command/remote.py on lines 114..119
dvc/command/remote.py on lines 147..152
dvc/command/remote.py on lines 171..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

    remote_modify_parser = remote_subparsers.add_parser(
        "modify",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(REMOTE_MODIFY_HELP, "remote/modify"),
        help=REMOTE_MODIFY_HELP,
Severity: Major
Found in dvc/command/remote.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 44..49
dvc/command/config.py on lines 62..67
dvc/command/remote.py on lines 85..90
dvc/command/remote.py on lines 114..119
dvc/command/remote.py on lines 134..139
dvc/command/remote.py on lines 171..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

class CmdRemoteConfig(CmdConfig):
    def __init__(self, args):
        super(CmdRemoteConfig, self).__init__(args)
        self.remote_config = RemoteConfig(self.config)
Severity: Minor
Found in dvc/command/remote.py and 1 other location - About 40 mins to fix
dvc/command/cache.py on lines 11..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

    remote_add_parser = remote_subparsers.add_parser(
        "add",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(REMOTE_ADD_HELP, "remote/add"),
        help=REMOTE_ADD_HELP,
Severity: Major
Found in dvc/command/remote.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 44..49
dvc/command/config.py on lines 62..67
dvc/command/remote.py on lines 114..119
dvc/command/remote.py on lines 134..139
dvc/command/remote.py on lines 147..152
dvc/command/remote.py on lines 171..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

def imp(self, url, path, out=None, rev=None):
Severity: Minor
Found in dvc/repo/imp.py - About 35 mins to fix

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

    def dvc_walk(top, dvcignore, topdown=True, onerror=None, followlinks=False):
    Severity: Minor
    Found in dvc/utils/__init__.py - About 35 mins to fix

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

      def modify(repo, path, typ=None, xpath=None, delete=False):
      Severity: Minor
      Found in dvc/repo/metrics/modify.py - About 35 mins to fix

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

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

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

              def line(self, x0, y0, x1, y1, char):
          Severity: Minor
          Found in dvc/dagascii.py - About 35 mins to fix

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

                def _upload(
            Severity: Minor
            Found in dvc/remote/oss.py - About 35 mins to fix

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

                  def _download(
              Severity: Minor
              Found in dvc/remote/oss.py - About 35 mins to fix

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

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

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

                      def _upload(
                  Severity: Minor
                  Found in dvc/remote/azure.py - About 35 mins to fix

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

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

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

                      def _read_metric(fd, typ=None, xpath=None, fname=None, branch=None):
                      Severity: Minor
                      Found in dvc/repo/metrics/show.py - About 35 mins to fix

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

                            def _download(
                        Severity: Minor
                        Found in dvc/remote/azure.py - About 35 mins to fix

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

                          def checkout(self, target=None, with_deps=False, force=False, recursive=False):
                          Severity: Minor
                          Found in dvc/repo/checkout.py - About 35 mins to fix

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

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

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

                              def loads_from(stage, s_list, use_cache=True, metric=False, persist=False):
                              Severity: Minor
                              Found in dvc/output/__init__.py - About 35 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language