uilianries/bintray-python

View on GitHub

Showing 187 of 187 total issues

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

        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

        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

        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

        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 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 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 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 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_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 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 _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_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 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 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_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
                              Severity
                              Category
                              Status
                              Source
                              Language