Showing 10 of 21 total issues
Function companyweb_information
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def companyweb_information(self, cr, uid, ids, vat_number, context=None):
login = self.pool['ir.config_parameter'].get_param(
cr, uid, 'companyweb.login', False)
pswd = self.pool['ir.config_parameter'].get_param(
cr, uid, 'companyweb.pswd', False)
- 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 create_openSalesDocs
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def create_openSalesDocs(self, cr, uid, ids, context=None):
if context is None:
context = {}
this = self.browse(cr, uid, ids)[0]
- 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
File account_companyweb_report_wizard.py
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
##############################################################################
#
# Authors: Adrien Peiffer
Function create_openSalesDocs
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_openSalesDocs(self, cr, uid, ids, context=None):
if context is None:
context = {}
this = self.browse(cr, uid, ids)[0]
Function create_createdSalesDocs
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_createdSalesDocs(self, cr, uid, ids, context=None):
if context is None:
context = {}
this = self.browse(cr, uid, ids)[0]
Function get_st_line_note
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_st_line_note(self, line, information_dict):
"""This method returns a formatted note from line information
"""
note = []
if line.counterparty_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"
Further reading
Function companyweb_information
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def companyweb_information(self, cr, uid, ids, vat_number, context=None):
Function get_update_values
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_update_values(self, cr, uid, ids, wizard, context=None):
Function get_st_vals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_st_vals(self, statement):
"""
This method return a dict of vals that can be passed to
create method of statement.
:return: dict of vals that represent additional infos for the statement
- 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 create_createdSalesDocs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_createdSalesDocs(self, cr, uid, ids, context=None):
if context is None:
context = {}
this = self.browse(cr, uid, ids)[0]
- 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"