Showing 84 of 141 total issues
Function get
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get(self, exclude_recurse=None):
"""
Paths matching exclude_recurse will not be recursed.
"""
reqs = Queue()
- 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 __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function fetch
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch(endpoint, states, znodes, ephemerals, datasize, sessions, zxids, idx):
Function find_outliers
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find_outliers(group, delta):
"""
given a list of values, find those that are apart from the rest by
`delta`. the indexes for the outliers is returned, if any.
- 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 do_exists
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def do_exists(self, params):
"""
\x1b[1mNAME\x1b[0m
exists - Gets the znode's stat information
- 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 do_summary
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def do_summary(self, params):
"""
\x1b[1mNAME\x1b[0m
summary - Prints summarized details of a path's children
- 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 create_async
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_async(self, path, value=b"", acl=None, ephemeral=False, sequence=False, makepath=False):
Function create
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, path, value=b"", acl=None, ephemeral=False, sequence=False, makepath=False):
Function do_tree
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_tree(self, path, max_depth, level, full_path, include_stat):
Avoid deeply nested control flow statements. Open
if mirror and child in dst_children:
dst_children.remove(child)
if max_items > 0 and i == max_items:
Function to_type
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def to_type(value, ptype):
""" Convert value to ptype """
if ptype == 'str':
return str(value)
elif ptype == 'int':
- 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 do_json_append
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def do_json_append(self, params):
"""
\x1b[1mNAME\x1b[0m
json_append - append an element to a list
- 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 fetch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fetch(cls, obj, keys):
"""
fetches the value corresponding to keys from obj
"""
current = obj
- 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
Avoid deeply nested control flow statements. Open
if max_items > 0 and i == max_items:
break
self.set_url(os.path.join(src_url, child))
Function set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def set(cls, obj, keys, value, fill_list_value=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, sid=None, ip=None, port=None, server_ip=None, server_port=None):
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, path, value=b"", acl=None, ephemeral=False,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, parse_result, exists, asynchronous, verbose):
Function copy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy(self, params, recursive, overwrite, max_items, mirror):
Function tree
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def tree(self, path, max_depth, full_path=False, include_stat=False):