iterative/dvc

View on GitHub

Showing 148 of 261 total issues

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

    fetch_parser = subparsers.add_parser(
        "fetch",
        parents=[shared_parent_parser()],
        description=append_doc_link(FETCH_HELP, "fetch"),
        help=FETCH_HELP,
Severity: Major
Found in dvc/command/data_sync.py and 2 other locations - About 45 mins to fix
dvc/command/data_sync.py on lines 105..110
dvc/command/data_sync.py on lines 155..160

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 35.

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

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

        if not self.no_traverse:
            return list(set(checksums) & set(self.all()))
Severity: Minor
Found in dvc/remote/base.py and 1 other location - About 45 mins to fix
dvc/remote/ssh/__init__.py on lines 312..313

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 35.

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 3 locations. Consider refactoring.
Open

    pull_parser = subparsers.add_parser(
        "pull",
        parents=[shared_parent_parser()],
        description=append_doc_link(PULL_HELP, "pull"),
        help=PULL_HELP,
Severity: Major
Found in dvc/command/data_sync.py and 2 other locations - About 45 mins to fix
dvc/command/data_sync.py on lines 155..160
dvc/command/data_sync.py on lines 198..203

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 35.

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 12..14

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 45..50
dvc/command/config.py on lines 63..68
dvc/command/remote.py on lines 119..124
dvc/command/remote.py on lines 139..144
dvc/command/remote.py on lines 152..157
dvc/command/remote.py on lines 176..181

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_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 45..50
dvc/command/config.py on lines 63..68
dvc/command/remote.py on lines 90..95
dvc/command/remote.py on lines 139..144
dvc/command/remote.py on lines 152..157
dvc/command/remote.py on lines 176..181

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_list_parser = remote_subparsers.add_parser(
        "list",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(REMOTE_LIST_HELP, "remote/list"),
        help=REMOTE_LIST_HELP,
Severity: Major
Found in dvc/command/remote.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 45..50
dvc/command/config.py on lines 63..68
dvc/command/remote.py on lines 90..95
dvc/command/remote.py on lines 119..124
dvc/command/remote.py on lines 139..144
dvc/command/remote.py on lines 152..157

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

    config_parser = subparsers.add_parser(
        "config",
        parents=[parent_config_parser, parent_parser],
        description=append_doc_link(CONFIG_HELP, "config"),
        help=CONFIG_HELP,
Severity: Major
Found in dvc/command/config.py and 6 other locations - About 40 mins to fix
dvc/command/cache.py on lines 45..50
dvc/command/remote.py on lines 90..95
dvc/command/remote.py on lines 119..124
dvc/command/remote.py on lines 139..144
dvc/command/remote.py on lines 152..157
dvc/command/remote.py on lines 176..181

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 45..50
dvc/command/config.py on lines 63..68
dvc/command/remote.py on lines 90..95
dvc/command/remote.py on lines 119..124
dvc/command/remote.py on lines 139..144
dvc/command/remote.py on lines 176..181

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 45..50
dvc/command/config.py on lines 63..68
dvc/command/remote.py on lines 90..95
dvc/command/remote.py on lines 119..124
dvc/command/remote.py on lines 152..157
dvc/command/remote.py on lines 176..181

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 _checkout has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _checkout(
Severity: Minor
Found in dvc/repo/checkout.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 _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 _upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def _upload(
        Severity: Minor
        Found in dvc/remote/local.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.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 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 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 status has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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