Showing 207 of 317 total issues
Function equals
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def equals(self, ldap_entry, attribute, value, ldap_config, company):
Function copy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy(self, cr, uid, id, default=None, context=None):
Function onchange_company_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def onchange_company_id(self, cr, uid, ids, company_id, context=None):
Function _get_graphical_representation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_graphical_representation(
Function contains
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def contains(self, ldap_entry, attribute, value, ldap_config, company):
Function write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(self, cr, uid, ids, vals, context=None):
Function query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def query(self, ldap_entry, attribute, value, ldap_config, company):
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, cr, uid, ids, data, context=None):
Function search_matches
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def search_matches(self, cr, uid, conf, mail_message, mail_message_org):
Function search_matches
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def search_matches(self, cr, uid, conf, mail_message, mail_message_org):
Function copy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy(self, cr, uid, record_id, default=None, context=None):
Function write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(self, cr, uid, ids, vals, context=None):
Function update_notification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_notification(self, cr, uid, ids, cron_mode=True, context=None):
Function onchange_model_id
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def onchange_model_id(self, cr, uid, ids, model_id, context=None):
Function read
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def read(self, cr, uid, ids, fields, context=None):
Function _execute_sql_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _execute_sql_request(
Function best_match
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def best_match(self, lang=None, failure_safe=True):
"""Get best match of current default lang.
:param str lang:
If a language in the form of "en_US" is supplied, it will have the
- 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 _write_menus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _write_menus(self):
sl = ["",
"Menus",
"-------",
""]
- 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 _patch_quick_create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _patch_quick_create(self, cr, ids):
def _wrap_name_create():
def wrapper(self, cr, uid, name, context=None):
raise orm.except_orm(
- 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_manually
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run_manually(self):
"""Run a job from the cron form view."""
if self.env.uid != SUPERUSER_ID and (not self.active or
not self.numbercall):
- 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"