Showing 507 of 611 total issues
Function lib_ext_kwargs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_subdir="lib"):
Function test_remote_rpc_exception_transport
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def test_remote_rpc_exception_transport(remote_repository):
with remote_repository:
s1 = "test string"
try:
- 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
Consider simplifying this complex logical expression. Open
Open
if tag in (TAG_PUT2, TAG_PUT) and is_index_object:
try:
new_segment, offset = self.io.write_put(key, data, raise_full=True)
except LoggedIO.SegmentFull:
complete_xfer()
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, path, write, filename=None, override_fd=None, integrity_data=None):
Function open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def open(self, *, exclusive, lock_wait=None, lock=True):
Function sizeof_fmt_iec
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sizeof_fmt_iec(num, suffix="B", sep="", precision=2, sign=False):
Function sizeof_fmt_decimal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def sizeof_fmt_decimal(num, suffix="B", sep="", precision=2, sign=False):
Function acl_get
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def acl_get(path, item, st, numeric_ids=False, fd=None):
Function mkstemp_mode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def mkstemp_mode(suffix=None, prefix=None, dir=None, text=False, mode=0o600):
Function setxattr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def setxattr(path, name, value, *, follow_symlinks=False):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, key, repository, item_keys=None, ro_cls=RepoObj):
Function os_stat
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def os_stat(*, path=None, parent_fd=None, name=None, follow_symlinks=False):
Function save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save(self, target, passphrase, algorithm, create=False):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __call__(self, parser, namespace, values, option_string=None):
Function filter_archives_by_date
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def filter_archives_by_date(archives, older=None, newer=None, oldest=None, newest=None):
Function clean_lines
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def clean_lines(lines, lstrip=None, rstrip=None, remove_empty=True, remove_comments=True):
Function __call__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __call__(self, parser, namespace, path, option_string=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, restrict_to_paths, restrict_to_repositories, append_only, storage_quota, use_socket):
Function init_from_given_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def init_from_given_data(self, *, crypt_key, id_key, chunk_seed):
Function save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save(self, target, passphrase, algorithm, create=False):