util/netutil.py
Function copy_directory_to_target
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def copy_directory_to_target(ipaddr, user, passwd, local_path, remote_path,
Function ssh_copy_file_to_target
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ssh_copy_file_to_target(ipaddr, user, passwd, local_file, remote_file,
Function ssh_connect_or_return
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ssh_connect_or_return(ipaddr, user, passwd, maxretries, remote_port=22):
Function create_remote_directory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_remote_directory(ipaddr, user, passwd, remote_path, remote_port=22):
Function ssh_delete_file_if_exists
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ssh_delete_file_if_exists(ipaddr, user, passwd, remote_file,
Function make_remote_file_executable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def make_remote_file_executable(ipaddr, user, passwd, remote_file,
Function remove_remote_directory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def remove_remote_directory(ipaddr, user, passwd, path, remote_port=22):
Function copy_directory_to_target
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def copy_directory_to_target(ipaddr, user, passwd, local_path, remote_path,
remote_port=22):
"""Copy a local directory on a remote machine.
:param ipaddr: IP adress of the remote machine
- 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"