Showing 30 of 68 total issues
Function __open_whitespaced_region
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __open_whitespaced_region(self):
# 3. Region from last whitespace to next whitespace
lastspace = self.__find_front_nearest_whitespace()
if self.__is_front_space(lastspace):
- 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 __handle_skin_path_init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __handle_skin_path_init():
skin_path = get_cached_skin_path()
if not skin_path:
# Open folder dialog and set skin 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 __handle_program_path_init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __handle_program_path_init():
program_path = get_cached_program_path()
if not program_path:
# Open dialog and set program path.
# Due to cache this might be annoying
- 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_skin_name_in_inis
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_skin_name_in_inis(inis):
"""
Retrieve skin name in a configuration.
A configuration can contain multiple skins.
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run(self):
"""Automatically executed upon calling this command."""
# check cache first to determine the default path shown to the user
install_cache_path = os.path.join(sublime.cache_path(), "Rainmeter", "install", "last_entered_folder.cache")
if os.path.exists(install_cache_path) and os.path.isfile(install_cache_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 find_resources_folders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_resources_folders(folder):
"""
Find @Resources folders in the given folder.
Is case insensitive.
- 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 __transform_raw_to_original_fmt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __transform_raw_to_original_fmt(raw, is_dec, has_alpha, is_lower):
# cut output from the '#' because Rainmeter does not use # for color codes
output = raw[1:]
if is_dec:
output = converter.convert_hex_str_to_rgba_str(output, has_alpha)
- 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_resources_folder_in_folder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_resources_folder_in_folder(folder):
"""
Find a single @Resources folder in the given folder.
"""
for root, directories, dummy_files in os.walk(folder):
- 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 compile_values
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def compile_values(options):
"""
Bake completions from the provided YAML options.
Considers stuff like hints and values.
- 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 levenshtein
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def levenshtein(top_string, bot_string):
"""
The Levenshtein distance is a string metric for measuring the difference between two sequences.
Informally,
- 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"