Showing 98 of 172 total issues
Function func
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def func(ctx, opts, owner_repo, page, page_size):
Function add_tags
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_tags(ctx, opts, owner_repo_package, tags, immutable):
Function add_quarantine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_quarantine(ctx, opts, owner_repo_package, page, page_size):
Function delete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def delete(ctx, opts, owner, identifier, yes):
Function refresh
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def refresh(ctx, opts, owner_repo_identifier, show_tokens, yes):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, status, detail=None, headers=None, body=None, fields=None):
Function list_entitlements
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def list_entitlements(owner, repo, page, page_size, show_tokens):
Function remove_quarantine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def remove_quarantine(ctx, opts, owner_repo_package, page, page_size):
Function update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update(ctx, opts, owner, identifier, policy_config_file):
Function ls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ls(ctx, opts, owner, page, page_size):
Function create_entitlement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_entitlement(owner, repo, name, token, show_tokens):
Function repos
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def repos(ctx, opts, owner_repo, page, page_size):
Function request_file_upload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def request_file_upload(
Function update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update(ctx, opts, owner, identifier, policy_config_file):
Function delete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def delete(ctx, opts, owner, identifier, yes):
Function update_upstream
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_upstream(owner, repo, slug_perm, upstream_format, upstream_config):
Function ls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ls(ctx, opts, owner, page, page_size):
Function get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get(ctx, opts, owner_repo, page, page_size):
Function list_upstreams
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def list_upstreams(owner, repo, upstream_format, page, page_size):
Function quota_history
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def quota_history(owner=None, oss=False, **kwargs):
"""Get Quota history for namespace"""
client = get_quota_api()
api_kwargs = {}
- Read upRead up
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"