iterative/dvc

View on GitHub

Showing 147 of 241 total issues

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

        try:
            self._sftp.rmdir(path)
        except IOError as exc:
            if exc.errno != errno.ENOENT:
Severity: Minor
Found in dvc/remote/ssh/connection.py and 1 other location - About 45 mins to fix
dvc/remote/ssh/connection.py on lines 172..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 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

    def _remove_file(self, path):
        try:
            self._sftp.remove(path)
        except IOError as exc:
            if exc.errno != errno.ENOENT:
Severity: Minor
Found in dvc/remote/ssh/connection.py and 1 other location - About 45 mins to fix
dvc/remote/ssh/connection.py on lines 188..191

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

    push_parser = subparsers.add_parser(
        "push",
        parents=[shared_parent_parser()],
        description=append_doc_link(PUSH_HELP, "push"),
        help=PUSH_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 135..140
dvc/command/data_sync.py on lines 228..233

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 6 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 5 other locations - About 40 mins to fix
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 145..150
dvc/command/remote.py on lines 165..170

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 6 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 5 other locations - About 40 mins to fix
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 145..150
dvc/command/remote.py on lines 165..170

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 6 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 5 other locations - About 40 mins to fix
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 145..150
dvc/command/remote.py on lines 165..170

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 6 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 5 other locations - About 40 mins to fix
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 165..170

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 6 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 5 other locations - About 40 mins to fix
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 145..150

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 6 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 5 other locations - About 40 mins to fix
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 145..150
dvc/command/remote.py on lines 165..170

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

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

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

        def open(path, repo_dir=None, remote=None, mode="r", encoding=None):
        Severity: Minor
        Found in dvc/api.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/azure.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 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/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/ssh/__init__.py - About 35 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language