uilianries/bintray-python

View on GitHub

Showing 187 of 187 total issues

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_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_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_ip_restrictions(self, subject, repo):
        """ Removes all restrictions, black and white.

        :param subject: repository owner
        :param repo: repository name
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 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 get_user_team(self, user, team):
        """ Get details of a team associated with an user

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

    def update_access_key_user(self, user, access_key_id, url=None, cache_for_secs=None,
                               expiry=None, white_cidrs=None, black_cidrs=None):
        """ Update an existing access key identified by an access key id, for an user.

            Security: Authenticated user with 'admin' permission.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 3469..3486

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

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

    def get_user_teams(self, user):
        """ Get a list of teams associated with an user

            This resource is only available to Bintray Premium users.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_organization(self, organization):
        """ Get information about a specified organization.

            "type" inside the "members" list is available only to organization admins
            "teams" list is available only to Premium organization admins
Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_stream_api(self, subject):
        """ Get a stream of events generated by activity for the specified subject.

            Security: Authenticated subject admin.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_access_keys_user(self, user):
        """ Get a list of access keys associated with an user

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288

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

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

    def regenerate_subject_url_signing_key(self, subject):
        """ Re-generates Subject key for URL Signing.

            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 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_access_keys_org(self, org):
        """ Get a list of access keys associated with an organization

            Security: Authenticated user with 'admin' permission.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3290..3301

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

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

    def get_user(self, user):
        """ Get information about a specified user

            Security: Get information about a specified user

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

             Security: Authenticated user with 'admin' permission.
Severity: Major
Found in bintray/bintray.py and 1 other location - About 2 hrs to fix
bintray/bintray.py on lines 3488..3505

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

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

    def get_org_teams(self, org):
        """ Get a list of teams 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 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_products(self, subject):
        """ Get a list of products for the specified subject.

            Security: Authenticated user with 'read' permission for private repositories, or
                      repository read entitlement.
Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def get_usage_threshold_org(self, org):
        """ Get organization usage threshold

            Security: Authenticated user with organization ‘admin’ permission.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2801..2812
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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

    def delete_usage_threshold_org(self, org):
        """ Delete organization usage threshold

            Security: Authenticated user with organization ‘admin’ permission.

Severity: Major
Found in bintray/bintray.py and 10 other locations - About 2 hrs to fix
bintray/bintray.py on lines 1313..1324
bintray/bintray.py on lines 1326..1340
bintray/bintray.py on lines 1474..1489
bintray/bintray.py on lines 1491..1505
bintray/bintray.py on lines 1910..1925
bintray/bintray.py on lines 2423..2434
bintray/bintray.py on lines 2438..2450
bintray/bintray.py on lines 2555..2566
bintray/bintray.py on lines 3277..3288
bintray/bintray.py on lines 3290..3301

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

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