uilianries/bintray-python

View on GitHub
bintray/bintray.py

Summary

Maintainability
F
2 mos
Test Coverage

File bintray.py has 3074 lines of code (exceeds 250 allowed). Consider refactoring.
Open

""" Python Wrapper for Bintray API

    https://bintray.com/docs/api
"""
import os
Severity: Major
Found in bintray/bintray.py - About 1 wk to fix

    Bintray has 157 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Bintray(object):
        """ Python Wrapper for Bintray API
    
        """
    
    
    Severity: Major
    Found in bintray/bintray.py - About 3 days to fix

      Function update_package has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def update_package(self, subject, repo, package, licenses=None, vcs_url=None,
      Severity: Major
      Found in bintray/bintray.py - About 1 hr to fix

        Function create_package has 14 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def create_package(self, subject, repo, package, licenses=None, vcs_url=None,
        Severity: Major
        Found in bintray/bintray.py - About 1 hr to fix

          Function debian_upload has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def debian_upload(self, subject, repo, package, version, remote_file_path, local_file_path,
          Severity: Major
          Found in bintray/bintray.py - About 1 hr to fix

            Function update_package has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
            Open

                def update_package(self, subject, repo, package, licenses=None, vcs_url=None,
                                   custom_licenses=None, desc=None, labels=None, website_url=None,
                                   issue_tracker_url=None, github_repo=None, github_release_notes_file=None,
                                   public_download_numbers=None, public_stats=None):
                    """ Update the information of the specified package.
            Severity: Minor
            Found in bintray/bintray.py - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function create_repository has 11 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def create_repository(self, subject, repo, type, description, private=False, labels=None,
            Severity: Major
            Found in bintray/bintray.py - About 1 hr to fix

              Function create_package has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  def create_package(self, subject, repo, package, licenses=None, vcs_url=None,
                                     custom_licenses=None, desc=None, labels=None, website_url=None,
                                     issue_tracker_url=None, github_repo=None, github_release_notes_file=None,
                                     public_download_numbers=None, public_stats=None):
                      """ Creates a new package in the specified repo (user has to be an owner of the repo)
              Severity: Minor
              Found in bintray/bintray.py - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function _create_access_key has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _create_access_key(self, request_url, 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
              
                           An access key password will be auto-generated if not specified.
              Severity: Minor
              Found in bintray/bintray.py - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function update_repository has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def update_repository(self, subject, repo, business_unit=None, description=None, labels=None,
              Severity: Major
              Found in bintray/bintray.py - About 1 hr to fix

                Function create_entitlement has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def create_entitlement(self, subject, repo=None, package=None, version=None,
                Severity: Major
                Found in bintray/bintray.py - About 1 hr to fix

                  Function upload_content has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def upload_content(self, subject, repo, package, version, remote_file_path, local_file_path,
                  Severity: Major
                  Found in bintray/bintray.py - About 1 hr to fix

                    Function create_version has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def create_version(self, subject, repo, package, version, description=None,
                    Severity: Major
                    Found in bintray/bintray.py - About 1 hr to fix

                      Function update_entitlement has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def update_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                      Severity: Major
                      Found in bintray/bintray.py - About 1 hr to fix

                        Function create_entitlement has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def create_entitlement(self, subject, repo=None, package=None, version=None,
                                                   access=None, access_keys=None, path=None, tags=None, product=None):
                                """ Create an entitlement on the specified scope. Scope can be a product, a repository with
                                    an optional path, a package or a version.
                        
                        
                        Severity: Minor
                        Found in bintray/bintray.py - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function update_version has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def update_version(self, subject, repo, package, version, description=None,
                        Severity: Major
                        Found in bintray/bintray.py - About 1 hr to fix

                          Function _create_access_key has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def _create_access_key(self, request_url, id, url=None, cache_for_secs=None, expiry=None,
                          Severity: Major
                          Found in bintray/bintray.py - About 1 hr to fix

                            Function create_access_key_user has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def create_access_key_user(self, user, id, url=None, cache_for_secs=None, expiry=None,
                            Severity: Major
                            Found in bintray/bintray.py - About 1 hr to fix

                              Function create_product has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def create_product(self, subject, name, display_name, desc, website, vcs, packages,
                              Severity: Major
                              Found in bintray/bintray.py - About 1 hr to fix

                                Function create_access_key_org has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def create_access_key_org(self, org, id, url=None, cache_for_secs=None, expiry=None,
                                Severity: Major
                                Found in bintray/bintray.py - About 1 hr to fix

                                  Function update_entitlement has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def update_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                             access=None, access_keys=None, tags=None, product=None):
                                          """ Update the information of the specified entitlement of a specified scope. Scope can be a
                                              product, a repository with an optional path, a package or a version.
                                  
                                  
                                  Severity: Minor
                                  Found in bintray/bintray.py - About 55 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function gpg_sign_version has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def gpg_sign_version(self, subject, repo, package, version, key_subject=None, passphrase=None,
                                  Severity: Major
                                  Found in bintray/bintray.py - About 50 mins to fix

                                    Function sync_version_artifacts_to_maven_central has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def sync_version_artifacts_to_maven_central(self, subject, repo, package, version, username,
                                    Severity: Major
                                    Found in bintray/bintray.py - About 50 mins to fix

                                      Function maven_upload has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def maven_upload(self, subject, repo, package, remote_file_path, local_file_path, publish=True,
                                      Severity: Major
                                      Found in bintray/bintray.py - About 50 mins to fix

                                        Function create_usage_threshold_repository has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            def create_usage_threshold_repository(self, org, repo, monthly_storage=None,
                                        Severity: Major
                                        Found in bintray/bintray.py - About 50 mins to fix

                                          Function update_eula has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              def update_eula(self, subject, product, eula, syntax, content, versions, default=False):
                                          Severity: Major
                                          Found in bintray/bintray.py - About 50 mins to fix

                                            Function update_access_key_org has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                def update_access_key_org(self, org, access_key_id, url=None, cache_for_secs=None, expiry=None,
                                            Severity: Major
                                            Found in bintray/bintray.py - About 50 mins to fix

                                              Function update_access_key_user has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  def update_access_key_user(self, user, access_key_id, url=None, cache_for_secs=None,
                                              Severity: Major
                                              Found in bintray/bintray.py - About 50 mins to fix

                                                Function create_eula has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    def create_eula(self, subject, product, name, syntax, content, versions, default=False):
                                                Severity: Major
                                                Found in bintray/bintray.py - About 50 mins to fix

                                                  Function _publish_discard_uploaded_content has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      def _publish_discard_uploaded_content(self, subject, repo, package, version, discard=False,
                                                  Severity: Major
                                                  Found in bintray/bintray.py - About 50 mins to fix

                                                    Function _get_custom_downloads has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        def _get_custom_downloads(self, subject, repo, package, suffix, version=None,
                                                    Severity: Major
                                                    Found in bintray/bintray.py - About 50 mins to fix

                                                      Function create_usage_threshold_business_unit has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          def create_usage_threshold_business_unit(self, org, business_unit, monthly_storage=None,
                                                      Severity: Major
                                                      Found in bintray/bintray.py - About 50 mins to fix

                                                        Function update_usage_threshold_business_unit has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            def update_usage_threshold_business_unit(self, org, business_unit, monthly_storage=None,
                                                        Severity: Major
                                                        Found in bintray/bintray.py - About 50 mins to fix

                                                          Function update_product has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              def update_product(self, subject, product, display_name=None, desc=None, website=None, vcs=None,
                                                          Severity: Major
                                                          Found in bintray/bintray.py - About 50 mins to fix

                                                            Function update_usage_threshold_repository has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                def update_usage_threshold_repository(self, org, repo, monthly_storage=None,
                                                            Severity: Major
                                                            Found in bintray/bintray.py - About 50 mins to fix

                                                              Function create_usage_threshold_org has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  def create_usage_threshold_org(self, org, monthly_storage=None, monthly_download=None,
                                                              Severity: Minor
                                                              Found in bintray/bintray.py - About 45 mins to fix

                                                                Function get_downloads_by_country has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    def get_downloads_by_country(self, subject, repo, package, version=None, from_date=None,
                                                                Severity: Minor
                                                                Found in bintray/bintray.py - About 45 mins to fix

                                                                  Function update_ip_restrictions has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                      def update_ip_restrictions(self, subject, repo, add_white_cidrs=None, rm_white_cidrs=None,
                                                                  Severity: Minor
                                                                  Found in bintray/bintray.py - About 45 mins to fix

                                                                    Function create_readme has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                        def create_readme(self, subject, repo, package, github=None, bintray_syntax=None,
                                                                    Severity: Minor
                                                                    Found in bintray/bintray.py - About 45 mins to fix

                                                                      Function test_webhook has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                          def test_webhook(self, subject, repo, package, version, url, method):
                                                                      Severity: Minor
                                                                      Found in bintray/bintray.py - About 45 mins to fix

                                                                        Function get_usage_report_for_package has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                            def get_usage_report_for_package(self, subject, repo, package=None, start_pos=50,
                                                                        Severity: Minor
                                                                        Found in bintray/bintray.py - About 45 mins to fix

                                                                          Function link_package has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                              def link_package(self, subject, repo, source_subject, source_repo, source_package,
                                                                          Severity: Minor
                                                                          Found in bintray/bintray.py - About 45 mins to fix

                                                                            Function create_version_release_notes_github has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                            Open

                                                                                def create_version_release_notes_github(self, subject, repo, package, version, github_repo,
                                                                            Severity: Minor
                                                                            Found in bintray/bintray.py - About 45 mins to fix

                                                                              Function create_version_release_notes_bintray has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                              Open

                                                                                  def create_version_release_notes_bintray(self, subject, repo, package, version, syntax,
                                                                              Severity: Minor
                                                                              Found in bintray/bintray.py - About 45 mins to fix

                                                                                Function get_entitlement has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                Open

                                                                                    def get_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                Severity: Minor
                                                                                Found in bintray/bintray.py - About 45 mins to fix

                                                                                  Function gpg_sign_file has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                  Open

                                                                                      def gpg_sign_file(self, subject, repo, file_path, key_subject=None, passphrase=None,
                                                                                  Severity: Minor
                                                                                  Found in bintray/bintray.py - About 45 mins to fix

                                                                                    Function _update_access_key has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def _update_access_key(self, request_url, url=None, cache_for_secs=None, expiry=None,
                                                                                    Severity: Minor
                                                                                    Found in bintray/bintray.py - About 45 mins to fix

                                                                                      Function _update_access_key has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                      Open

                                                                                          def _update_access_key(self, request_url, 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
                                                                                      
                                                                                                  Security: Authenticated user with 'admin' permission.
                                                                                      Severity: Minor
                                                                                      Found in bintray/bintray.py - About 45 mins to fix

                                                                                      Cognitive Complexity

                                                                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                      A method's cognitive complexity is based on a few simple rules:

                                                                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                      • Code is considered more complex for each "break in the linear flow of the code"
                                                                                      • Code is considered more complex when "flow breaking structures are nested"

                                                                                      Further reading

                                                                                      Function get_daily_downloads has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                      Open

                                                                                          def get_daily_downloads(self, subject, repo, package, version=None, from_date=None,
                                                                                      Severity: Minor
                                                                                      Found in bintray/bintray.py - About 45 mins to fix

                                                                                        Function delete_entitlement has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                        Open

                                                                                            def delete_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                        Severity: Minor
                                                                                        Found in bintray/bintray.py - About 45 mins to fix

                                                                                          Function get_total_downloads has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                          Open

                                                                                              def get_total_downloads(self, subject, repo, package, version=None, from_date=None,
                                                                                          Severity: Minor
                                                                                          Found in bintray/bintray.py - About 45 mins to fix

                                                                                            Function get_product_signed_eulas has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                            Open

                                                                                                def get_product_signed_eulas(self, subject, product, from_date=None, to_date=None,
                                                                                            Severity: Minor
                                                                                            Found in bintray/bintray.py - About 45 mins to fix

                                                                                              Function update_usage_threshold_org has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  def update_usage_threshold_org(self, org, monthly_storage=None, monthly_download=None,
                                                                                              Severity: Minor
                                                                                              Found in bintray/bintray.py - About 45 mins to fix

                                                                                                Function update_repository has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    def update_repository(self, subject, repo, business_unit=None, description=None, labels=None,
                                                                                                                          gpg_sign_metadata=None, gpg_sign_files=None, gpg_use_owner_key=None,
                                                                                                                          version_update_max_days=None):
                                                                                                        """ Update a repository under the specified subject
                                                                                                
                                                                                                
                                                                                                Severity: Minor
                                                                                                Found in bintray/bintray.py - About 45 mins to fix

                                                                                                Cognitive Complexity

                                                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                A method's cognitive complexity is based on a few simple rules:

                                                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                                                Further reading

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

                                                                                                    def get_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                Severity: Minor
                                                                                                Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                      def create_package_release_notes_github(self, subject, repo, package, github_repo,
                                                                                                  Severity: Minor
                                                                                                  Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                        def search_maven_package(self, group_id=None, artifact_id=None, query=None, subject=None,
                                                                                                    Severity: Minor
                                                                                                    Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                          def create_product_readme(self, subject, product, github=None, bintray_syntax=None,
                                                                                                      Severity: Minor
                                                                                                      Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                            def create_org_team(self, org, name, members, allow_repo_creation=True, business_unit=None):
                                                                                                        Severity: Minor
                                                                                                        Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                              def update_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                          Severity: Minor
                                                                                                          Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                def set_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                            Severity: Minor
                                                                                                            Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                  def url_signing(self, subject, repo, file_path, json_data, encrypt=False):
                                                                                                              Severity: Minor
                                                                                                              Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                    def get_version(self, subject, repo, package, version="_latest", attribute_values=True):
                                                                                                                Severity: Minor
                                                                                                                Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                      def search_file_by_name(self, name, subject=None, repo=None, start_pos=None,
                                                                                                                  Severity: Minor
                                                                                                                  Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                        def get_version_files(self, subject, repo, package, version, include_unpublished=False):
                                                                                                                    Severity: Minor
                                                                                                                    Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                          def register_webhook(self, subject, repo, package, url, method):
                                                                                                                      Severity: Minor
                                                                                                                      Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                            def get_entitlements(self, subject, repo=None, package=None, version=None, product=None):
                                                                                                                        Severity: Minor
                                                                                                                        Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                              def create_package_release_notes_bintray(self, subject, repo, package, syntax, content):
                                                                                                                          Severity: Minor
                                                                                                                          Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                def unlink_package(self, subject, repo, source_subject, source_repo, source_package):
                                                                                                                            Severity: Minor
                                                                                                                            Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                  def download_package_download_log_file(self, subject, repo, package, remote_log_name,
                                                                                                                              Severity: Minor
                                                                                                                              Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                    def create_user_team(self, user, name, members, allow_repo_creation=True, business_unit=None):
                                                                                                                                Severity: Minor
                                                                                                                                Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                      def update_user_team(self, user, team, members=None, allow_repo_creation=None,
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                        def delete_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                          def update_org_team(self, org, team, members=None, allow_repo_creation=None, business_unit=None):
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                            def search_file_by_checksum(self, sha1, subject=None, repo=None, start_pos=None,
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                              def search_attributes(self, subject, repo, package=None, attributes=None,
                                                                                                                                          Severity: Minor
                                                                                                                                          Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                                def get_all_products_signed_eulas(self, subject, from_date=None, to_date=None, username=None,
                                                                                                                                            Severity: Minor
                                                                                                                                            Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                                  def publish_uploaded_content(self, subject, repo, package, version, passphrase=None):
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                                    def discard_uploaded_content(self, subject, repo, package, version, passphrase=None):
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in bintray/bintray.py - About 35 mins to fix

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

                                                                                                                                                      def dynamic_download(self, subject, repo, remote_file_path, local_file_path, bt_package=None):
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in bintray/bintray.py - About 35 mins to fix

                                                                                                                                                    Function create_product has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def create_product(self, subject, name, display_name, desc, website, vcs, packages,
                                                                                                                                                                           sign_url_expiry=10):
                                                                                                                                                            """ Create a product for the given subject.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'admin' permission.
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 35 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function search_maven_package has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def search_maven_package(self, group_id=None, artifact_id=None, query=None, subject=None,
                                                                                                                                                                                 repo=None):
                                                                                                                                                            """ Search for a Maven package using Maven groupId and artifactId
                                                                                                                                                    
                                                                                                                                                                Security: Non-authenticated user.
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function create_readme has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def create_readme(self, subject, repo, package, github=None, bintray_syntax=None,
                                                                                                                                                                          bintray_content=None):
                                                                                                                                                            """ Creates a new readme for the specified package by subject.
                                                                                                                                                    
                                                                                                                                                                "content" has to be passed to the command if using "bintray", or will be retrieved from
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function update_product has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def update_product(self, subject, product, display_name=None, desc=None, website=None, vcs=None,
                                                                                                                                                                           packages=None):
                                                                                                                                                            """ Update an existing product.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'admin' permission.
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function create_product_readme has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def create_product_readme(self, subject, product, github=None, bintray_syntax=None,
                                                                                                                                                                                  bintray_content=None):
                                                                                                                                                            """ Sets the readme for all of a product’s underlying packages.
                                                                                                                                                    
                                                                                                                                                                "content" has to be passed to the command if using "bintray", or will be retrieved from
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function get_entitlements has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def get_entitlements(self, subject, repo=None, package=None, version=None, product=None):
                                                                                                                                                            """ Get the entitlements defined on the specified product, repository, package or version.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'admin' permission.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function delete_entitlement has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def delete_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                                                                                                               product=None):
                                                                                                                                                            """ Delete an entitlement by its id and scope. Scope can be a product, a repository,
                                                                                                                                                                a package or a version.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function gpg_sign_version has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def gpg_sign_version(self, subject, repo, package, version, key_subject=None, passphrase=None,
                                                                                                                                                                             key_path=None):
                                                                                                                                                            """ GPG sign all files associated with the specified version.
                                                                                                                                                    
                                                                                                                                                                GPG signing information may be needed
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

                                                                                                                                                    Function get_entitlement has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                        def get_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                                                                                                            product=None):
                                                                                                                                                            """ Get an entitlement by its id and scope. Scope can be a product, a repository, a package
                                                                                                                                                                or a version.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py - About 25 mins to fix

                                                                                                                                                    Cognitive Complexity

                                                                                                                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                                                                                                    A method's cognitive complexity is based on a few simple rules:

                                                                                                                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                                                                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                                                                                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                                                                                                                    Further reading

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

                                                                                                                                                        def update_usage_threshold_business_unit(self, org, business_unit, monthly_storage=None,
                                                                                                                                                                                                 monthly_download=None, daily_download=None,
                                                                                                                                                                                                 alert_to_emails=None, alert_to_admins=None):
                                                                                                                                                            """ Update usage threshold for business unit
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 2731..2764

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

                                                                                                                                                    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_usage_threshold_repository(self, org, repo, monthly_storage=None,
                                                                                                                                                                                              monthly_download=None, daily_download=None,
                                                                                                                                                                                              alert_to_emails=None, alert_to_admins=None):
                                                                                                                                                            """ Update repository usage threshold
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 2766..2799

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

                                                                                                                                                    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_user_team(self, user, team, members=None, allow_repo_creation=None,
                                                                                                                                                                             business_unit=None):
                                                                                                                                                            """ Update a team associated with an user
                                                                                                                                                    
                                                                                                                                                                This resource is only available to Bintray Premium users.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 1606..1637

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

                                                                                                                                                    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_usage_threshold_business_unit(self, org, business_unit, monthly_storage=None,
                                                                                                                                                                                                 monthly_download=None, daily_download=None,
                                                                                                                                                                                                 alert_to_emails=None, alert_to_admins=True):
                                                                                                                                                            """ Create usage threshold for business unit
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 2629..2661

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

                                                                                                                                                    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_org_team(self, org, team, members=None, allow_repo_creation=None, business_unit=None):
                                                                                                                                                            """ Update 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 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 1639..1671

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

                                                                                                                                                    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_usage_threshold_repository(self, org, repo, monthly_storage=None,
                                                                                                                                                                                              monthly_download=None, daily_download=None,
                                                                                                                                                                                              alert_to_emails=None, alert_to_admins=True):
                                                                                                                                                            """ Create repository usage threshold
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 2663..2696

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

                                                                                                                                                    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 search_file_by_name(self, name, subject=None, repo=None, start_pos=None,
                                                                                                                                                                                created_after=None):
                                                                                                                                                            """ Search for a file by its name. name can take the * and ? wildcard characters.
                                                                                                                                                    
                                                                                                                                                                May take an optional subject and/or repo name to search in and/or created_after
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 117..145

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

                                                                                                                                                    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_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                                                                                                            product=None):
                                                                                                                                                            """ Get an entitlement by its id and scope. Scope can be a product, a repository, a package
                                                                                                                                                                or a version.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 3625..3657

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

                                                                                                                                                    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_entitlement(self, subject, entitlement_id, repo=None, package=None, version=None,
                                                                                                                                                                               product=None):
                                                                                                                                                            """ Delete an entitlement by its id and scope. Scope can be a product, a repository,
                                                                                                                                                                a package or a version.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 3535..3567

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

                                                                                                                                                    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 search_file_by_checksum(self, sha1, subject=None, repo=None, start_pos=None,
                                                                                                                                                                                created_after=None):
                                                                                                                                                            """ Search for a file by its sha1 checksum.
                                                                                                                                                    
                                                                                                                                                                May take an optional subject and/or repo name to search in.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 day to fix
                                                                                                                                                    bintray/bintray.py on lines 86..115

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

                                                                                                                                                    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 search_entitlement_by_tag(self, tag=None, scope=None, product=None, deep=False):
                                                                                                                                                            """ Search for entitlements for a specific tag in the specified scope.
                                                                                                                                                    
                                                                                                                                                                The minimal scope is a subject.
                                                                                                                                                                You can optionally add a sub-scope of product, repo, package and version.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 7 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 3715..3745

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

                                                                                                                                                    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 search_entitlement_by_access_key(self, access_key=None, scope=None, product=None,
                                                                                                                                                                                             deep=False):
                                                                                                                                                            """ Search for entitlements for a specific access key in the specified scope.
                                                                                                                                                    
                                                                                                                                                                The minimal scope is a subject.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 7 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 3747..3776

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

                                                                                                                                                    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_packages(self, subject, repo, start_pos=None, start_name=None):
                                                                                                                                                            """ Get a list of packages in the specified repository.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'read' permission, or repository read entitlement.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 3194..3215

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

                                                                                                                                                    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_usage_report_for_repository(self, subject, repo, from_date=None, to_date=None):
                                                                                                                                                            """ Get monthly download and storage usage report, according to the specified date range
                                                                                                                                                                for a specific subject repository.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'admin' permission.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 2845..2864

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

                                                                                                                                                    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_team(self, org, name, members, allow_repo_creation=True, business_unit=None):
                                                                                                                                                            """ Create a new team for 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 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 1575..1604

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

                                                                                                                                                    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_team(self, user, name, members, allow_repo_creation=True, business_unit=None):
                                                                                                                                                            """ Create a new team for 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 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 1544..1573

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

                                                                                                                                                    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_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                                                                            """ Update attributes associated with the specified package or version.
                                                                                                                                                    
                                                                                                                                                                Attributes may have a null value. Optionally, specify an attribute type. Otherwise,
                                                                                                                                                                type will be inferred from the attribute’s value. If a type cannot be inferred, string
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 1959..1988

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

                                                                                                                                                    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_attributes(self, subject, repo, package, version=None, attributes=None):
                                                                                                                                                            """ Associate attributes with the specified package or version, overriding all previous
                                                                                                                                                                attributes.
                                                                                                                                                    
                                                                                                                                                                Optionally, specify an attribute type. Otherwise, type will be inferred from the
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 5 hrs to fix
                                                                                                                                                    bintray/bintray.py on lines 1990..2017

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

                                                                                                                                                    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_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

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

                                                                                                                                                        def get_package_for_file(self, subject, repo, file_path):
                                                                                                                                                            """ Get general information about the package 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 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 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_eula(self, subject, product, eula):
                                                                                                                                                            """ Returns the specified product EULA.
                                                                                                                                                    
                                                                                                                                                                This resource is only available to Bintray Enterprise 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 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_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

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

                                                                                                                                                        def delete_usage_threshold_business_unit(self, org, business_unit):
                                                                                                                                                            """ Delete usage threshold for business unit
                                                                                                                                                    
                                                                                                                                                                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 2814..2826
                                                                                                                                                    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_org(self, org, access_key_id):
                                                                                                                                                            """ Delete an access key associated with an organization.
                                                                                                                                                    
                                                                                                                                                                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 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_ip_restrictions(self, subject, repo):
                                                                                                                                                            """ Gets whitelisted and blacklisted CIDRs.
                                                                                                                                                    
                                                                                                                                                            :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 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 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_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_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_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_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 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 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

                                                                                                                                                    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 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_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_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 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

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

                                                                                                                                                            if "passphrase" in body and len(body.keys()) == 1:
                                                                                                                                                                headers = {"X-GPG-PASSPHRASE": passphrase}
                                                                                                                                                                body = None
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 hr to fix
                                                                                                                                                    bintray/bintray.py on lines 603..605

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

                                                                                                                                                    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 "passphrase" in body and len(body.keys()) == 1:
                                                                                                                                                                headers = {"X-GPG-PASSPHRASE": passphrase}
                                                                                                                                                                body = None
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 1 hr to fix
                                                                                                                                                    bintray/bintray.py on lines 637..639

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

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_repository(self, subject, repo):
                                                                                                                                                            """ Get general information about a repository of the specified user
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'read' permission for private repositories,
                                                                                                                                                                          or repository read entitlement.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 55 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 521..530
                                                                                                                                                    bintray/bintray.py on lines 532..540

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

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def delete_user_proprietary_license(self, user, custom_license_name):
                                                                                                                                                            """ Delete a license associated with an user.
                                                                                                                                                    
                                                                                                                                                            :param user: User name
                                                                                                                                                            :param custom_license_name: License to be deleted
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 55 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 521..530
                                                                                                                                                    bintray/bintray.py on lines 696..707

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

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def delete_org_proprietary_license(self, org, custom_license_name):
                                                                                                                                                            """ Delete a license associated with an organization.
                                                                                                                                                                For organization, caller must be an admin of the organization.
                                                                                                                                                    
                                                                                                                                                            :param org: Organization name
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 55 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 532..540
                                                                                                                                                    bintray/bintray.py on lines 696..707

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

                                                                                                                                                    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 publish_uploaded_content(self, subject, repo, package, version, passphrase=None):
                                                                                                                                                            """ Asynchronously publishes all unpublished content for a user’s package version.
                                                                                                                                                    
                                                                                                                                                            :param subject: username or organization
                                                                                                                                                            :param repo: repository name
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 315..325

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_org_proprietary_licenses(self, org):
                                                                                                                                                            """ Get a list of custom, proprietary licenses associated with an organization
                                                                                                                                                    
                                                                                                                                                            :param org: Organization name
                                                                                                                                                            :return: Licenses list
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 4 other locations - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 436..443
                                                                                                                                                    bintray/bintray.py on lines 552..561
                                                                                                                                                    bintray/bintray.py on lines 563..572
                                                                                                                                                    bintray/bintray.py on lines 684..694

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def discard_uploaded_content(self, subject, repo, package, version, passphrase=None):
                                                                                                                                                            """ Asynchronously discard all unpublished content for a user’s package version.
                                                                                                                                                    
                                                                                                                                                            :param subject: username or organization
                                                                                                                                                            :param repo: repository name
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 302..312

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_repositories(self, subject):
                                                                                                                                                            """ Get a list of repos writable by subject (personal or organizational)
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'read' permission for private repositories,
                                                                                                                                                                          or repository read entitlement.
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 4 other locations - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 427..434
                                                                                                                                                    bintray/bintray.py on lines 436..443
                                                                                                                                                    bintray/bintray.py on lines 552..561
                                                                                                                                                    bintray/bintray.py on lines 563..572

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_user_proprietary_licenses(self, user):
                                                                                                                                                            """ Get a list of custom, proprietary licenses associated with an user
                                                                                                                                                    
                                                                                                                                                            :param user: User name
                                                                                                                                                            :return: Licenses list
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 4 other locations - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 427..434
                                                                                                                                                    bintray/bintray.py on lines 552..561
                                                                                                                                                    bintray/bintray.py on lines 563..572
                                                                                                                                                    bintray/bintray.py on lines 684..694

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_user_gpg_public_key(self, user):
                                                                                                                                                            """ Get the subject GPG public key.
                                                                                                                                                    
                                                                                                                                                                The response Content-Type format is 'application/pgp-keys'.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 4 other locations - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 427..434
                                                                                                                                                    bintray/bintray.py on lines 436..443
                                                                                                                                                    bintray/bintray.py on lines 552..561
                                                                                                                                                    bintray/bintray.py on lines 684..694

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_org_gpg_public_key(self, org):
                                                                                                                                                            """ Get the organization GPG public key.
                                                                                                                                                    
                                                                                                                                                                The response Content-Type format is 'application/pgp-keys'.
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 4 other locations - About 45 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 427..434
                                                                                                                                                    bintray/bintray.py on lines 436..443
                                                                                                                                                    bintray/bintray.py on lines 563..572
                                                                                                                                                    bintray/bintray.py on lines 684..694

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 35.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                            with open(local_file_path, 'rb') as file_content:
                                                                                                                                                                response = self._requester.put(url, params=parameters, data=file_content,
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 216..217

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                            if isinstance(bintray_syntax, str) and isinstance(bintray_content, str):
                                                                                                                                                                json_data = {"bintray": {
                                                                                                                                                                        "syntax": bintray_syntax,
                                                                                                                                                                        "content": bintray_content
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 1242..1245

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                            if isinstance(bintray_syntax, str) and isinstance(bintray_content, str):
                                                                                                                                                                json_data = {"bintray": {
                                                                                                                                                                        "syntax": bintray_syntax,
                                                                                                                                                                        "content": bintray_content
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 1282..1285

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_daily_downloads(self, subject, repo, package, version=None, from_date=None,
                                                                                                                                                                                to_date=None):
                                                                                                                                                            """ Get number of downloads per day, for the passed time range, per package or per version.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'publish' permission for private repositories,
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 3136..3152
                                                                                                                                                    bintray/bintray.py on lines 3154..3170

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_total_downloads(self, subject, repo, package, version=None, from_date=None,
                                                                                                                                                                                to_date=None):
                                                                                                                                                            """ Get total number of downloads, for the passed time range, per package or per version.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'publish' permission for private repositories,
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 3117..3134
                                                                                                                                                    bintray/bintray.py on lines 3154..3170

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                        def get_downloads_by_country(self, subject, repo, package, version=None, from_date=None,
                                                                                                                                                                                     to_date=None):
                                                                                                                                                            """ Get total number of downloads, for the passed time range, per package or per version.
                                                                                                                                                    
                                                                                                                                                                Security: Authenticated user with 'publish' permission for private repositories,
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in bintray/bintray.py and 2 other locations - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 3117..3134
                                                                                                                                                    bintray/bintray.py on lines 3136..3152

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

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

                                                                                                                                                            with open(local_file_path, 'rb') as file_content:
                                                                                                                                                                response = self._requester.put(url, params=parameters, data=file_content,
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in bintray/bintray.py and 1 other location - About 40 mins to fix
                                                                                                                                                    bintray/bintray.py on lines 257..258

                                                                                                                                                    Duplicated Code

                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                    Tuning

                                                                                                                                                    This issue has a mass of 34.

                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                    Refactorings

                                                                                                                                                    Further Reading

                                                                                                                                                    There are no issues that match your filters.

                                                                                                                                                    Category
                                                                                                                                                    Status