uilianries/bintray-python

View on GitHub

Showing 187 of 187 total issues

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

    def create_version_release_notes_bintray(self, subject, repo, package, version, syntax,
                                             content):
        """ Create release notes for a package by subject.
            Release notes "content" has to be passed to the command

Severity: Major
Found in bintray/bintray.py and 1 other location - About 4 hrs to fix
bintray/bintray.py on lines 2329..2354

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

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 product:
            url = "{}/products/{}/{}/entitlements".format(Bintray.BINTRAY_URL, subject, product)
        else:
            if version:
                url = "{}/packages/{}/{}/{}/versions/{}/entitlements".format(Bintray.BINTRAY_URL,
Severity: Major
Found in bintray/bintray.py and 1 other location - About 4 hrs to fix
bintray/bintray.py on lines 3598..3609

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

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 product:
            url = "{}/products/{}/{}/entitlements".format(Bintray.BINTRAY_URL, subject, product)
        else:
            if version:
                url = "{}/packages/{}/{}/{}/versions/{}/entitlements".format(Bintray.BINTRAY_URL,
Severity: Major
Found in bintray/bintray.py and 1 other location - About 4 hrs to fix
bintray/bintray.py on lines 3519..3530

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

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 create_version_release_notes_github(self, subject, repo, package, version, github_repo,
                                            github_release_notes_file):
        """ Create release notes for a specific version by subject. Release notes "content"
            will be copied from the provided GitHub release notes if using "github".

Severity: Major
Found in bintray/bintray.py and 1 other location - About 4 hrs to fix
bintray/bintray.py on lines 2356..2380

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

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 url or cache_for_secs:
            json_data["existence_check"] = {}
            if url:
                json_data["existence_check"]["url"] = url
            if cache_for_secs:
Severity: Major
Found in bintray/bintray.py and 1 other location - About 3 hrs to fix
bintray/bintray.py on lines 3352..3357

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

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 url or cache_for_secs:
            json_data["existence_check"] = {}
            if url:
                json_data["existence_check"]["url"] = url
            if cache_for_secs:
Severity: Major
Found in bintray/bintray.py and 1 other location - About 3 hrs to fix
bintray/bintray.py on lines 3454..3459

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

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 update_file_attributes(self, subject, repo, file_path, attributes):
        """ Update the Artifact with new attributes without removing the older Artifact’s attributes

            Security: Authenticated user with 'publish' permission, or write entitlement for
                      repository path.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 2097..2114

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

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 set_file_attributes(self, subject, repo, file_path, attributes):
        """ Set attributes associated with the specified Artifact.

            Overriding all previous attributes.

Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 2116..2131

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

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 delete_version(self, subject, repo, package, version):
        """ Delete the specified version

            Security: Authenticated user with 'publish' permission, or package read/write
                      entitlement.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 2311..2327

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 get_version_release_notes(self, subject, repo, package, version):
        """ Get release notes for a specific version by subject

            Security: Authenticated user with 'read' permission for private repositories, or version
                      read entitlement.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 1125..1142

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

    def version_for_file(self, subject, repo, file_path):
        """ Get general information about the version a repository file is associated with.

            Security: Non-authenticated user.

Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def delete_team_permission(self, subject, repo, team):
        """ Delete the permission defined for a team on the specified repository

            This resource is only available to Bintray Premium users.

Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def get_file_attributes(self, subject, repo, file_path):
        """ Returns all the attributes related to Artifact.

            This resource can be consumed by both authenticated and anonymous users.

Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def delete_webhook(self, subject, repo, package):
        """ Delete a user’s webhook associated with the specified package.

            Security: Authenticated user with 'publish' permission, or package read/write
                      entitlement.
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def get_team_permissions(self, subject, repo, team):
        """ Get the permissions defined for a team on the specified repository

            This resource is only available to Bintray Premium users.
            For organization, caller must be an admin of the organization.
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def delete_package(self, subject, repo, package):
        """ Delete the specified package

            Security: Authenticated user with 'publish' permission, or repository
                      ead/write entitlement.
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896

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

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

    def delete_package_release_notes(self, subject, repo, package):
        """ Deletes release notes for a specific package by subject.

            Security: Authenticated user with 'publish' permission, or package read/write
                      entitlement.
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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 create_user_proprietary_license(self, user, name, description, url):
        """ Create a license associated with an user.

        :param user: User name
        :param name: license name
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 445..461

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

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

    def get_list_package_download_log_files(self, subject, repo, package):
        """ Retrieve a list of available download log files for a package

            Security: Authenticated user with 'publish' permission, or package read/write
                      entitlement.
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1198..1213
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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

    def get_readme(self, subject, repo, package):
        """ Returns the readme for the specified package by subject.
            Either Bintray readme or GitHub readme.

            Security: Authenticated user with 'read' permission for private repositories,
Severity: Major
Found in bintray/bintray.py and 11 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1181..1194
bintray/bintray.py on lines 1455..1470
bintray/bintray.py on lines 1726..1743
bintray/bintray.py on lines 1767..1783
bintray/bintray.py on lines 1805..1822
bintray/bintray.py on lines 2079..2095
bintray/bintray.py on lines 2229..2242
bintray/bintray.py on lines 2294..2309
bintray/bintray.py on lines 2384..2398
bintray/bintray.py on lines 2883..2896
bintray/bintray.py on lines 2985..2999

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

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