Showing 8 of 10 total issues
Function parse_usul_dict
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def parse_usul_dict(cls):
mu2_usul_dict = {}
inv_mu2_usul_dict = {}
usul_dict = cls.get_usul_dict()
for key, val in iteritems(usul_dict):
- 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 correct_offset_gracenote
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def correct_offset_gracenote(cls, txt_file, mu2_file):
# extract symbtr data
data = ScoreExtras.get_symbtr_data(txt_file, mu2_file)
# get zaman and mertebe from usul variant
- 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 _chk_usul_by_id
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _chk_usul_by_id(cls, index, inv_mu2_usul_dict, row, symbtr_name,
Function _chk_usul_by_name
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _chk_usul_by_name(cls, index, mu2_usul_dict, row, symbtr_name, usul_id,
Function _parse_usul_row
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _parse_usul_row(cls, row, index, mu2_usul_dict, inv_mu2_usul_dict,
Function _chk_usul_attr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _chk_usul_attr(row, usul, attr_str, symbtr_name, index, usul_name):
Function add_usul_to_first_row
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_usul_to_first_row(cls, txt_file, mu2_file):
# extract symbtr data
data = ScoreExtras.get_symbtr_data(txt_file, mu2_file)
# get usul variant
- 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_zaman_mertebe
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_zaman_mertebe(data):
usul_dict = ScoreExtras.get_usul_dict()
for usul in usul_dict.values():
for uv in usul['variants']:
if uv['mu2_name'] == data['usul']['mu2_name']:
- 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"