Showing 30 of 71 total issues
Function get_document_class_default
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_document_class_default(self, document_classes):
if self.turn_issuer.vat_affected not in ['SI']:
exempt_ids = [
self.env.ref('l10n_cl_invoice.dc_y_f_dtn').id,
self.env.ref('l10n_cl_invoice.dc_y_f_dte').id]
- 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 _printed_prices
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _printed_prices(self, cr, uid, ids, name, args, context=None):
Function create_sequence
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_sequence(self, cr, uid, name, journal, context=None):
Function get_worked_days
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_worked_days(self, form, emp_id, emp_salary, mes, ano):
Function create_journals
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_journals(self, cr, uid, journal_ids, wz, context=None):
Function get_salary
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_salary(self, emp_id, emp_salary, cod_id, mes, ano):
Function download_document
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def download_document(self, model, field, id, filename=None, **kw):
Function send_dte
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def send_dte(self):
self.ensure_one()
_logger.info('Entering Send XML Function')
_logger.info(
- 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 check_vat_cl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_vat_cl (self, vat):
body, vdig = '', ''
if len(vat) > 9:
vat = vat.replace('-','',1).replace('.','',2)
if len(vat) != 9:
- 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 action_enable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def action_enable(self):
result = xmltodict.parse(
base64.b64decode(self.caf_file).replace(
'<?xml version="1.0"?>','',1))['AUTORIZACION']['CAF']['DA']
- 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"