Showing 5 of 5 total issues
Function fix_builtins
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def fix_builtins(override_debug=False):
"""Activate the builtins compatibility."""
override_dict = {}
orig_print = None
used_print = None
- 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 fix_base
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def fix_base(fix_environ):
"""Activate the base compatibility."""
def _is_android():
import os
- 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 fix_subprocess
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def fix_subprocess(override_debug=False, override_exception=False):
"""Activate the subprocess compatibility."""
import subprocess
# Exceptions
- 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 _subprocess_called_process_error
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _subprocess_called_process_error(already_exist, subprocess_lib):
if already_exist:
class ExtCalledProcessError(subprocess_lib.CalledProcessError):
"""Raised when a process run by check_call() or check_output()
returns a non-zero exit status."""
- 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 find_and_fix_documentation_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_and_fix_documentation_files(path):
dir_list = tuple(sorted(os.listdir(path)))
if len(dir_list) != 0:
for filename in dir_list:
if filename.endswith(".rst"):
- 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"