uilianries/bintray-python

View on GitHub

Showing 187 of 187 total issues

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

Severity
Category
Status
Source
Language