Function fields_view_get
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def fields_view_get(self, cr, user, view_id=None, view_type='form',
context=None, toolbar=False, submenu=False):
result = super(fetchmail_server, self).fields_view_get(
cr, user, view_id, view_type, context, toolbar, submenu)
- 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 attach_mail
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def attach_mail(self, connection, object_id, folder, mail_message, msgid):
'''Return ids of messages created'''
mail_message_ids = []
- 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 apply_matching
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def apply_matching(self, connection, folder, msgid, match_algorithm):
'''Return ids of objects matched'''
matched_object_ids = []
- 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 button_confirm_login
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def button_confirm_login(self, cr, uid, ids, context=None):
retval = super(fetchmail_server, self).button_confirm_login(
cr, uid, ids, context)
for this in self.browse(cr, uid, ids, context):
- 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 fetch_mail
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def fetch_mail(self, cr, uid, ids, context=None):
if context is None:
context = {}
check_original = []
- 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 fields_view_get
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def fields_view_get(self, cr, user, view_id=None, view_type='form',
Function onchange_server_type
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def onchange_server_type(
Avoid deeply nested control flow statements. Open
if modifiers[field][modifier]:
modifiers[field][modifier].insert(0, '|')
modifiers[field][modifier].append(
Function attach_mail
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def attach_mail(self, connection, object_id, folder, mail_message, msgid):
Function handle_folder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_folder(self, connection, folder):
'''Return ids of objects matched'''
matched_object_ids = []
- 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"