Showing 139 of 218 total issues
Function _proceed_remote_gather
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _proceed_remote_gather(self, walkresult, remotepath, dirjs, filejs, args = None):
Function pdbg
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def pdbg(msg, showtime = True, showdate = False, prefix = '', suffix = ''):
Function _proceed_downdir
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _proceed_downdir(self, walkresult, remotepath, dirjs, filejs, args):
Function _accept
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _accept(self, rpath, size, md5str, slicemd5str, crcstr):
Function _handle_more_response_error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _handle_more_response_error(self, r, sc, ec, act, actargs):
Function perr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def perr(msg, showtime = True, showdate = False, prefix = '', suffix = ''):
Function pwarn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def pwarn(msg, showtime = True, showdate = False, prefix = '', suffix = ''):
Function pinfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def pinfo(msg, showtime = True, showdate = False, prefix = '', suffix = ''):
Function _request_work_die
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _request_work_die(self, ex, url, pars, r, act):
Function _walk_proceed_remote_dir
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _walk_proceed_remote_dir(self, remotepath, proceed, args = None, skip_remote_only_dirs = False, recursive = True):
Function _walk_remote_dir
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _walk_remote_dir(self, remotepath, remoterootpath, args = None, skip_remote_only_dirs = False, recursive = True):
Function _proceed_share_remote
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _proceed_share_remote(self, walkresult, rpath, dirjs, filejs, args):
Function accept
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def accept(self, remotepath, size, md5str, slicemd5str, crcstr):
Function _handle_more_response_error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _handle_more_response_error(self, r, sc, ec, act, actargs):
Function _proceed_list
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _proceed_list(self, walkresult, remotepath, dirjs, filejs, args):
Function _syncdown_diff_one
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _syncdown_diff_one(self, rpath, localdir, d):
result = const.ENoError
t = d[0]
p = d[1]
#lcpath = os.path.join(localdir, p) # local complete path
- 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 _is_error_response
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _is_error_response(self, r):
# don't attempt on large contents
isJson = False
ContentTypeKey = 'Content-Type'
contentType = r.headers.get(ContentTypeKey)
- 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 _proceed_downdir
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _proceed_downdir(self, walkresult, remotepath, dirjs, filejs, args):
result = walkresult
rootrpath, localpath = args
#rlen = len(remotepath) + 1
rootlen = len(rootrpath) + 1 # '+ 1' for the trailing '/', it bites.
- 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_json_errorcode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_json_errorcode(self, r, act, defaultec = const.ERequestFailed):
try:
j = r.json()
self.pd("Website returned JSON: {}".format(j))
if 'error_code' in j:
- 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 _panapi_unzip_file_act
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _panapi_unzip_file_act(self, r, args):
j = r.json()
self.pd("Unzip response: {}".format(j))
if j['errno'] == 0:
if 'time' in j:
- 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"