Showing 97 of 166 total issues
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 add_tags
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_tags(ctx, opts, owner_repo_package, tags, immutable):
Function ls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ls(ctx, opts, owner, 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 list_upstreams
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def list_upstreams(owner, repo, upstream_format, page, page_size):
Function list_entitlements
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def list_entitlements(owner, repo, page, page_size, show_tokens):
Function repos
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def repos(ctx, opts, owner_repo, page, page_size):
Function delete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def delete(ctx, opts, owner, identifier, yes):
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 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 func
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def func(ctx, opts, owner_repo, page, page_size):
Function ls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ls(ctx, opts, owner, page, page_size):
Function replace_tags
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def replace_tags(ctx, opts, owner_repo_package, tags, immutable):
Function create_entitlement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_entitlement(owner, repo, name, token, show_tokens):
Function resolve_command
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def resolve_command(self, ctx, args):
try:
return super().resolve_command(ctx, args)
except click.exceptions.UsageError:
# Before DYM kicks in, check to see if the command prefix matches
- 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"
Further reading
Function get_error_hint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_error_hint(self, ctx):
if self.ctx:
files = []
for path in self.ctx.config_searchpath:
for filename in self.ctx.config_files:
- 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"