Showing 42 of 105 total issues
Function replace_headers
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
def replace_headers(pkg=basename(getcwd()), last=None, path=getcwd()):
last = dict() if last is None else last
pkg = __import__(pkg) if isinstance(pkg, str) else pkg
root, _ = split(pkg.__file__)
- 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_project
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def create_project(name=None, slogan=None, author=None, email=None, url=None,
pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
"""create a new project"""
log(INFO, '')
- 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
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def do(name=None, slogan=None, author=None, email=None, url=None,
commit=None, path=getcwd(), venv=None, update=None, clone=None,
env=None, cleanup=None, **kwargs):
env = env if env and exists(env) else None
project_path = join(path, name) if name else 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 _get_help_string
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _get_help_string(self, action):
action_help = action.help
defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
if action.default is not None and action.default is not SUPPRESS:
if '%(default)' not in action.help:
- 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
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), commit=None, tag=None, header=None,
Function do
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), header=None, status=None, commit=None,
Function do
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(name=None, slogan=None, author=None, email=None, url=None,
Function _run
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _run(command, level=LEVEL, path=getcwd(), capture_output=False): # nosec
proc = run(command, cwd=path, shell=True,
capture_output=capture_output, text=True)
log_level = ERROR if proc.returncode else level
if proc.stdout:
- 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
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), commit=None, fail_fast=None, pdf=None,
Function do
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
Function auxilium
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def auxilium(args=None):
# init config and argument parser
config = ConfigParser(allow_no_value=True)
config.read(Path.home().joinpath(CONFIG_PATH))
config.read(join(getcwd(), CONFIG_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 do
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), commit=None, fail_fast=None, pdf=None,
api=None, doctest=None, show=None, cleanup=None, coverage=None,
path=None, env=None, **kwargs):
if cleanup:
return _cleanup(venv=env)
- 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
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
Function create_project
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_project(name=None, slogan=None, author=None, email=None, url=None,
pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
"""create a new project"""
log(INFO, '')
Function do
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
quality=None, security=None, coverage=None, cleanup=None,
path=None, env=None, **kwargs):
"""run test process"""
- 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
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def do(pkg=basename(getcwd()), header=None, status=None, commit=None,
pull=None, remote=None, remote_usr=None, remote_pwd=None,
install=None, upgrade=None, requirements=None, cleanup=None,
path=getcwd(), env=None, **kwargs):
if cleanup:
- 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 start_demo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def start_demo(demo=DEMO_PATH, verbosity=0, exit_status=0, env=None, **kwargs):
logging.log(logging.INFO, ICONS["demo"] + 'relax, just starting a demo')
if exists(demo):
yn = input(" " + ICONS["warn"] +
"demo path exists. "
- 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
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
pre=None, pkg=None, path=None, **kwargs):
exit = int if exit_status < 0 else sys.exit
# check demo
if demo:
- 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_project
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_project(name=None, slogan=None, author=None, email=None, url=None,
Function do
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def do(c='', m='', f='', stdin='', arg=(), env=None, **kwargs):