sonntagsgesicht/auxilium

View on GitHub

Showing 105 of 105 total issues

Function replace_headers has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

def replace_headers(pkg=basename(getcwd()), last=None, path=getcwd()):
    last = dict() if last is None else last
    pkg = __import__(pkg) if isinstance(pkg, str) else pkg
    root, _ = split(pkg.__file__)

Severity: Minor
Found in auxilium/tools/docmaintain_tools.py - About 6 hrs 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

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

def pull_git(remote='None', path=getcwd(), venv=None):
    """pull from remote `git` repo"""
    log(INFO, ICONS["pull"] + "pull from remote `git` repo")
    log(DEBUG, ICONS[""] + clean_url(remote))
    return script("pull('.', %r)" % remote,
Severity: Major
Found in auxilium/tools/dulwich_tools.py and 1 other location - About 4 hrs to fix
auxilium/tools/dulwich_tools.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 84.

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 fetch_git(remote='None', path=getcwd(), venv=None):
    """fetch from remote `git` repo"""
    log(INFO, ICONS["pull"] + "fetch from remote `git` repo")
    log(DEBUG, ICONS[""] + clean_url(remote))
    return script("fetch('.', %r)" % remote,
Severity: Major
Found in auxilium/tools/dulwich_tools.py and 1 other location - About 4 hrs to fix
auxilium/tools/dulwich_tools.py on lines 180..184

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

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 epub(fail_fast=False, level=LEVEL, path=getcwd(), venv=None):
    """build epub documentation"""
    log(INFO, ICONS["epub"] + 'build epub documentation')
    cmd = _build('epub', fail_fast=fail_fast, warning_to_exception=False)
    return module('sphinx', cmd, level=level, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/sphinx_tools.py and 1 other location - About 3 hrs to fix
auxilium/tools/sphinx_tools.py on lines 101..105

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

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 latex(fail_fast=False, level=LEVEL, path=getcwd(), venv=None):
    """build latex documentation"""
    log(INFO, ICONS["latex"] + 'build latex documentation')
    cmd = _build('latex', fail_fast=fail_fast, warning_to_exception=False)
    return module('sphinx', cmd, level=level, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/sphinx_tools.py and 1 other location - About 3 hrs to fix
auxilium/tools/sphinx_tools.py on lines 94..98

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

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

def html(fail_fast=False, level=LEVEL, path=getcwd(), venv=None):
    """build html documentation"""
    log(INFO, ICONS["html"] + 'build html documentation')
    cmd = _build('html', fail_fast=fail_fast)
    return module('sphinx', cmd, level=level, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/sphinx_tools.py and 2 other locations - About 3 hrs to fix
auxilium/tools/sphinx_tools.py on lines 59..63
auxilium/tools/sphinx_tools.py on lines 87..91

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

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

    parser.add_argument(
        '--cleanup',
        action='store_const',
        const=not config.getboolean('update', 'cleanup', fallback=False),
        default=config.getboolean('update', 'cleanup', fallback=False),
Severity: Major
Found in auxilium/add_arguments/update.py and 1 other location - About 3 hrs to fix
auxilium/add_arguments/create.py on lines 71..76

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

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

    parser.add_argument(
        '--cleanup',
        action='store_const',
        const=not config.getboolean('update', 'cleanup', fallback=False),
        default=config.getboolean('update', 'cleanup', fallback=False),
Severity: Major
Found in auxilium/add_arguments/create.py and 1 other location - About 3 hrs to fix
auxilium/add_arguments/update.py on lines 82..87

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

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

def single(fail_fast=False, level=LEVEL, path=getcwd(), venv=None):
    """build single-html documentation"""
    log(INFO, ICONS["single"] + 'build single-html documentation')
    cmd = _build('singlehtml', fail_fast=fail_fast)
    return module('sphinx', cmd, level=level, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/sphinx_tools.py and 2 other locations - About 3 hrs to fix
auxilium/tools/sphinx_tools.py on lines 59..63
auxilium/tools/sphinx_tools.py on lines 80..84

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

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

def doctest(fail_fast=False, level=LEVEL, path=getcwd(), venv=None):
    """run doctest, testing code examples in docs"""
    log(INFO, ICONS["test"] + 'run doctest scripts')
    cmd = _build('doctest', fail_fast=fail_fast)
    return module('sphinx', cmd, level=level, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/sphinx_tools.py and 2 other locations - About 3 hrs to fix
auxilium/tools/sphinx_tools.py on lines 80..84
auxilium/tools/sphinx_tools.py on lines 87..91

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

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 create_project has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

def create_project(name=None, slogan=None, author=None, email=None, url=None,
                   pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
    """create a new project"""

    log(INFO, '')
Severity: Minor
Found in auxilium/tools/setup_tools.py - About 3 hrs 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 do has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def do(name=None, slogan=None, author=None, email=None, url=None,
       commit=None, path=getcwd(), venv=None, update=None, clone=None,
       env=None, cleanup=None, **kwargs):
    env = env if env and exists(env) else None
    project_path = join(path, name) if name else path
Severity: Minor
Found in auxilium/methods/create.py - About 2 hrs 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

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

def quality(pkg=basename(getcwd()), path=getcwd(), venv=None):
    """evaluate quality of source code"""
    log(INFO, ICONS["quality"] + 'evaluate quality of source code')
    return quality_flake8(pkg, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/quality_tools.py and 1 other location - About 2 hrs to fix
auxilium/tools/security_tools.py on lines 21..24

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

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 security(pkg=basename(getcwd()), path=getcwd(),  venv=None):
    """evaluate security of source code"""
    log(INFO, ICONS["security"] + 'evaluate security of source code')
    return security_bandit(pkg, path=path, venv=venv)
Severity: Major
Found in auxilium/tools/security_tools.py and 1 other location - About 2 hrs to fix
auxilium/tools/quality_tools.py on lines 21..24

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

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

Severity: Major
Found in auxilium/tools/gitlab_tools.py and 1 other location - About 2 hrs to fix
auxilium/tools/bitbucket_tools.py on lines 0..23

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

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

Severity: Major
Found in auxilium/tools/bitbucket_tools.py and 1 other location - About 2 hrs to fix
auxilium/tools/gitlab_tools.py on lines 0..23

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

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 _get_help_string has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

    def _get_help_string(self, action):
        action_help = action.help
        defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
        if action.default is not None and action.default is not SUPPRESS:
            if '%(default)' not in action.help:
Severity: Minor
Found in auxilium/add_arguments/formatter.py - About 2 hrs 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

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

    parser.add_argument(
        '--quality',
        action='store_const',
        const=not config.getboolean('test', 'quality', fallback=True),
        default=config.getboolean('test', 'quality', fallback=True),
Severity: Major
Found in auxilium/add_arguments/test.py and 15 other locations - About 2 hrs to fix
auxilium/add_arguments/build.py on lines 26..31
auxilium/add_arguments/build.py on lines 64..69
auxilium/add_arguments/build.py on lines 86..91
auxilium/add_arguments/doc.py on lines 33..38
auxilium/add_arguments/doc.py on lines 39..44
auxilium/add_arguments/doc.py on lines 45..50
auxilium/add_arguments/doc.py on lines 51..56
auxilium/add_arguments/doc.py on lines 57..62
auxilium/add_arguments/doc.py on lines 63..68
auxilium/add_arguments/test.py on lines 57..62
auxilium/add_arguments/test.py on lines 63..68
auxilium/add_arguments/update.py on lines 31..36
auxilium/add_arguments/update.py on lines 37..42
auxilium/add_arguments/update.py on lines 43..48
auxilium/add_arguments/update.py on lines 49..54

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

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

    parser.add_argument(
        '--header',
        action='store_const',
        const=not config.getboolean('update', 'header', fallback=True),
        default=config.getboolean('update', 'header', fallback=True),
Severity: Major
Found in auxilium/add_arguments/update.py and 15 other locations - About 2 hrs to fix
auxilium/add_arguments/build.py on lines 26..31
auxilium/add_arguments/build.py on lines 64..69
auxilium/add_arguments/build.py on lines 86..91
auxilium/add_arguments/doc.py on lines 33..38
auxilium/add_arguments/doc.py on lines 39..44
auxilium/add_arguments/doc.py on lines 45..50
auxilium/add_arguments/doc.py on lines 51..56
auxilium/add_arguments/doc.py on lines 57..62
auxilium/add_arguments/doc.py on lines 63..68
auxilium/add_arguments/test.py on lines 51..56
auxilium/add_arguments/test.py on lines 57..62
auxilium/add_arguments/test.py on lines 63..68
auxilium/add_arguments/update.py on lines 31..36
auxilium/add_arguments/update.py on lines 37..42
auxilium/add_arguments/update.py on lines 49..54

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

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

    parser.add_argument(
        '--install',
        action='store_const',
        const=not config.getboolean('update', 'install', fallback=False),
        default=config.getboolean('update', 'install', fallback=False),
Severity: Major
Found in auxilium/add_arguments/update.py and 15 other locations - About 2 hrs to fix
auxilium/add_arguments/build.py on lines 26..31
auxilium/add_arguments/build.py on lines 64..69
auxilium/add_arguments/build.py on lines 86..91
auxilium/add_arguments/doc.py on lines 33..38
auxilium/add_arguments/doc.py on lines 39..44
auxilium/add_arguments/doc.py on lines 45..50
auxilium/add_arguments/doc.py on lines 51..56
auxilium/add_arguments/doc.py on lines 57..62
auxilium/add_arguments/doc.py on lines 63..68
auxilium/add_arguments/test.py on lines 51..56
auxilium/add_arguments/test.py on lines 57..62
auxilium/add_arguments/test.py on lines 63..68
auxilium/add_arguments/update.py on lines 37..42
auxilium/add_arguments/update.py on lines 43..48
auxilium/add_arguments/update.py on lines 49..54

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

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

Severity
Category
Status
Source
Language