OCA/server-tools

View on GitHub

Showing 207 of 317 total issues

Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

            def create(self, cr, uid, vals, context=None, **kwargs):
Severity: Minor
Found in base_field_validator/models/ir_model.py - About 35 mins to fix

    Function map_ldap_attributes has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def map_ldap_attributes(self, cr, uid, conf, login, ldap_entry):
    Severity: Minor
    Found in users_ldap_mail/users_ldap_model.py - About 35 mins to fix

      Function copy has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def copy(self, cr, uid, id, default=None, context=None):
      Severity: Minor
      Found in auth_from_http_remote_user/res_users.py - About 35 mins to fix

        Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def create(self, cr, uid, ids, data, context=None):
        Severity: Minor
        Found in base_module_doc_rst/report/report_proximity_graph.py - About 35 mins to fix

          Function search_matches has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def search_matches(self, cr, uid, conf, mail_message, mail_message_org):
          Severity: Minor
          Found in fetchmail_attach_from_folder/match_algorithm/email_domain.py - About 35 mins to fix

            Function write has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def write(self, cr, uid, ids, vals, context=None):
            Severity: Minor
            Found in security_protector/security_protector.py - About 35 mins to fix

              Function datetime_formatter has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def datetime_formatter(self, value, lang=None, template=MODE_DATETIME,
              Severity: Minor
              Found in datetime_formatter/models.py - About 35 mins to fix

                Function text_from_html has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def text_from_html(self, html_content, max_words=None, max_chars=None,
                Severity: Minor
                Found in html_text/models/ir_fields_converter.py - About 35 mins to fix

                  Function field_to_populate_as_related has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def field_to_populate_as_related(self, cr, uid, field, company_cols, context=None):
                  Severity: Minor
                  Found in configuration_helper/config.py - About 35 mins to fix

                    Function query has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def query(self, ldap_entry, attribute, value, ldap_config, company):
                    Severity: Minor
                    Found in users_ldap_groups/models/users_ldap_groups.py - About 35 mins to fix

                      Function write has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def write(self, cr, uid, ids, vals, context=None):
                      Severity: Minor
                      Found in auditlog/models/rule.py - About 35 mins to fix

                        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):
                        Severity: Minor
                        Found in mass_editing/models/mass_object.py - About 35 mins to fix

                          Function copy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def copy(self, cr, uid, record_id, default=None, context=None):
                          Severity: Minor
                          Found in mass_editing/models/mass_object.py - About 35 mins to fix

                            Function update_notification has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def update_notification(self, cr, uid, ids, cron_mode=True, context=None):
                            Severity: Minor
                            Found in disable_openerp_online/model/publisher_warranty_contract.py - About 35 mins to fix

                              Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def read(self, cr, uid, ids, fields, context=None):
                              Severity: Minor
                              Found in mass_editing/wizard/mass_editing_wizard.py - About 35 mins to fix

                                Function _execute_sql_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def _execute_sql_request(
                                Severity: Minor
                                Found in sql_request_abstract/models/sql_request_mixin.py - About 35 mins to fix

                                  Function _constrain_url has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def _constrain_url(self):
                                          for this in self:
                                              if this == self.env.ref('base_import_odoo.demodb', False):
                                                  continue
                                              if tools.config['test_enable']:
                                  Severity: Minor
                                  Found in base_import_odoo/models/import_odoo_database.py - About 35 mins to fix

                                  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 _field_validator_hook has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def _field_validator_hook(self, cr, ids):
                                  
                                          def _wrap_create():
                                              def create(self, cr, uid, vals, context=None, **kwargs):
                                                  model_pool = self.pool['ir.model']
                                  Severity: Minor
                                  Found in base_field_validator/models/ir_model.py - About 35 mins to fix

                                  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",
                                                "-------",
                                                ""]
                                  Severity: Minor
                                  Found in base_module_doc_rst/wizard/tech_rst_guide.py - About 35 mins to fix

                                  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 dump_pgbadger has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def dump_pgbadger(self, dir_dump, output, cursor):
                                          pgbadger = find_in_path("pgbadger")
                                          if not pgbadger:
                                              _logger.error("Pgbadger not found")
                                              return
                                  Severity: Minor
                                  Found in profiler/controllers/main.py - About 35 mins to fix

                                  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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language