uilianries/bintray-python

View on GitHub

Showing 97 of 187 total issues

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

    def get_package_release_notes(self, subject, repo, package):
        """ Get the release notes for a specific package by subject; Either Bintray
            release notes or GitHub release notes.

        :param subject: repository owner
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 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 2 locations. Consider refactoring.
Open

    def create_org_proprietary_license(self, org, name, description, url):
        """ Create a license associated with an organization.
            Caller must be an admin of the organization.

        :param org: Organization name
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 463..478

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_access_key_user(self, user, id, url=None, cache_for_secs=None, expiry=None,
                               white_cidrs=None, black_cidrs=None, api_only=False):
        """ Create a new access key identified by an access key id, for an user.

             An access key password will be auto-generated if not specified.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 3369..3387

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

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_access_key_org(self, org, id, url=None, cache_for_secs=None, expiry=None,
                              white_cidrs=None, black_cidrs=None, api_only=False):
        """ Create a new access key identified by an access key id, for an organization.

             An access key password will be auto-generated if not specified.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 3389..3407

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

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

    def delete_product_readme(self, subject, product):
        """ Deletes the readme for all of a product’s underlying packages.

            Security: Authenticated user with 'publish' permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def delete_usage_threshold_repository(self, org, repo):
        """ Delete repository usage threshold

            Security: Authenticated user with organization ‘admin’ permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def delete_org_team(self, org, team):
        """ Delete a team associated with an organization

            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 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_eulas(self, subject, product):
        """ Get a list of EULAs for the specified product.

            This resource is only available to Bintray Enterprise users.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_org_team(self, org, team):
        """ Get details of a team associated with an organization


            This resource is only available to Bintray Premium users.
Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_access_key_user(self, user, access_key_id):
        """ Get an access key associated with an user, by its id.

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_geo_restrictions(self, subject, repo):
        """ Get the list of countries which are defined in the 'black_list' or in the 'white_list'.

            This feature is limited to users with Enterprise account.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def delete_product(self, subject, product):
        """ Delete the specified product and all its sub-elements (such as EULAs).

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_usage_threshold_repository(self, org, repo):
        """ Get repository organization usage threshold

            Security: Authenticated user with organization ‘admin’ permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_usage_threshold_business_unit(self, org, business_unit):
        """ Get business unit usage threshold

            Security: Authenticated user with organization ‘admin’ permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_product(self, subject, product):
        """ Get details for the specified product.

            Security: Authenticated user with 'read' permission for private repositories, or
                      repository read entitlement.
Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def delete_access_key_user(self, user, access_key_id):
        """ Delete an access key associated with an user.

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421

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

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

    def delete_geo_restrictions(self, subject, repo):
        """ Remove all the countries from the 'white_list' and 'black_list'.

            This feature is limited to users with Enterprise account.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def delete_user_team(self, user, team):
        """ Delete a team associated with an user

            This resource is only available to Bintray Premium users.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_access_key_org(self, org, access_key_id):
        """ Get an access key associated with an organization, by its id.

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1708..1724
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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

    def get_all_team_permissions(self, subject, repo):
        """ Get the permissions defined for teams 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 20 other locations - About 2 hrs to fix
bintray/bintray.py on lines 930..944
bintray/bintray.py on lines 975..989
bintray/bintray.py on lines 991..1001
bintray/bintray.py on lines 1056..1067
bintray/bintray.py on lines 1296..1309
bintray/bintray.py on lines 1507..1524
bintray/bintray.py on lines 1526..1542
bintray/bintray.py on lines 1673..1689
bintray/bintray.py on lines 1691..1706
bintray/bintray.py on lines 1787..1803
bintray/bintray.py on lines 2452..2465
bintray/bintray.py on lines 2539..2551
bintray/bintray.py on lines 2568..2580
bintray/bintray.py on lines 2582..2595
bintray/bintray.py on lines 2814..2826
bintray/bintray.py on lines 2828..2841
bintray/bintray.py on lines 3303..3315
bintray/bintray.py on lines 3317..3329
bintray/bintray.py on lines 3409..3421
bintray/bintray.py on lines 3423..3435

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

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